|
@@ -24,7 +24,28 @@
|
|
|
<el-form-item label="供应商来源" prop="supplierSource">
|
|
|
<el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item style="width:66.5%;" label="备注" prop="remark">
|
|
|
+ <el-form-item label="入库人员" prop="storageUserId">
|
|
|
+ <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入库时间" prop="storageTime">
|
|
|
+ <el-date-picker
|
|
|
+ size="small"
|
|
|
+ style="width:100%"
|
|
|
+ v-model="warehousingsruleForm.storageTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ align="right"
|
|
|
+ :picker-options="pickerOptions">
|
|
|
+ </el-date-picker>
|
|
|
+ <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="width:100%;" label="备注" prop="remark">
|
|
|
<el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -266,6 +287,28 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ pickerOptions: {
|
|
|
+ shortcuts: [{
|
|
|
+ text: '今天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', new Date());
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '昨天',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '一周前',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
Userid:'',
|
|
|
token:"",
|
|
|
MaterialType:'',
|
|
@@ -290,7 +333,9 @@ export default {
|
|
|
AdditemsName:"",
|
|
|
Additemstextarea:"",
|
|
|
ID:0,
|
|
|
+ groupNameData:[],
|
|
|
//入库参数
|
|
|
+ userNameData:[],
|
|
|
warehousingslist:[],
|
|
|
warehousingsVisible:false,
|
|
|
warehousingsruleForm: {
|
|
@@ -302,6 +347,8 @@ export default {
|
|
|
supplierTel: '',
|
|
|
supplierAddress: '',
|
|
|
supplierSource: '',
|
|
|
+ storageUserId:'',
|
|
|
+ storageTime:'',
|
|
|
remark: ''
|
|
|
},
|
|
|
warehousingsrules: {
|
|
@@ -326,12 +373,18 @@ export default {
|
|
|
supplierSource: [
|
|
|
{ required: true, message: '请输入', trigger: 'blur' },
|
|
|
],
|
|
|
+ storageUserId: [
|
|
|
+ { required: true, message: '请选择', trigger: 'change' },
|
|
|
+ ],
|
|
|
+ storageTime: [
|
|
|
+ { required: true, message: '请选择', trigger: 'blur' },
|
|
|
+ ],
|
|
|
remark: [
|
|
|
{ required: true, message: '请输入', trigger: 'blur' },
|
|
|
],
|
|
|
},
|
|
|
//领用参数
|
|
|
- ClaimitemVisible:true,
|
|
|
+ ClaimitemVisible:false,
|
|
|
ClaimsruleForm:{
|
|
|
id:0,
|
|
|
groupId:'',
|
|
@@ -361,6 +414,17 @@ export default {
|
|
|
val=Number(val);
|
|
|
return val.toFixed(2);
|
|
|
},
|
|
|
+ //处理日期
|
|
|
+ datetime(val){
|
|
|
+ var date=new Date(val);
|
|
|
+ var y=date.getFullYear();
|
|
|
+ var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
|
|
|
+ var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
|
|
|
+ var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
|
|
|
+ var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
|
|
|
+ var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
|
|
|
+ return y+'-'+m+'-'+d+' '+s+':'+f+':'+mm
|
|
|
+ },
|
|
|
//获取
|
|
|
GoodsInitDataSource() {
|
|
|
var url = "/api/PersonnelModule/GoodsInitDataSource"
|
|
@@ -375,6 +439,7 @@ export default {
|
|
|
if (res.data.code == 200) {
|
|
|
that.MaterialTypearr=res.data.data.goodsTypeData;
|
|
|
that.AddMaterialTypearr=res.data.data.goodsTypeData;
|
|
|
+ that.userNameData=res.data.data.userNameData;
|
|
|
that.MaterialType=that.MaterialTypearr[0].id;
|
|
|
that.MaterialTypechange();
|
|
|
} else {
|
|
@@ -621,6 +686,8 @@ export default {
|
|
|
supplierTel:that.warehousingsruleForm.supplierTel,
|
|
|
supplierAddress:that.warehousingsruleForm.supplierAddress,
|
|
|
supplierSource:that.warehousingsruleForm.supplierSource,
|
|
|
+ storageUserId:that.warehousingsruleForm.storageUserId,
|
|
|
+ storageTime:that.datetime(that.warehousingsruleForm.storageTime),
|
|
|
remark:that.warehousingsruleForm.remark,
|
|
|
}
|
|
|
}).then(function (res) {
|
|
@@ -659,6 +726,8 @@ export default {
|
|
|
that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
|
|
|
that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
|
|
|
that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
|
|
|
+ that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
|
|
|
+ that.warehousingsruleForm.storageTime=datainfo.storageTime;
|
|
|
that.warehousingsruleForm.remark=datainfo.remark;
|
|
|
}else{
|
|
|
that.$message.error(res.data.msg);
|
|
@@ -709,7 +778,7 @@ export default {
|
|
|
if (valid) {
|
|
|
this.GoodsStorageOP();
|
|
|
} else {
|
|
|
- console.log('error submit!!');
|
|
|
+ console.log(this.datetime(this.warehousingsruleForm.storageTime));
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
@@ -819,6 +888,9 @@ export default {
|
|
|
.warehousingsrule-input .el-form-item__error{
|
|
|
top: 82%;
|
|
|
}
|
|
|
+.warehousingsrule-input .el-select{
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
.warehousingsrule-table .all-box .el-table th.el-table__cell>.cell{
|
|
|
text-align: center;
|
|
|
font-size: 12px;
|