|
@@ -86,9 +86,8 @@
|
|
|
</u-col>
|
|
|
</u-row>
|
|
|
<view style="display: flex;position: relative;left: 30%;" v-if="item.itemName">
|
|
|
- <u-number-box style="margin-left: 15rpx;" :disabled="item.inc==0"
|
|
|
- v-model="item.num"></u-number-box>
|
|
|
- <text style="margin-left: 20rpx;color: red;" >
|
|
|
+ <u-number-box style="margin-left: 15rpx;" :disabled="item.inc==0" v-model="item.num"></u-number-box>
|
|
|
+ <text style="margin-left: 20rpx;color: red;">
|
|
|
¥{{item.num*item.price}}
|
|
|
</text>
|
|
|
<view style="margin-left: 60rpx;" @click="remarkFn(item)">
|
|
@@ -187,13 +186,14 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- remarkFn(type){
|
|
|
- let remark=type.remark?type.remark:'';
|
|
|
- this.$common.to('/pages/onely-disinfect/add-remark?needRemark='+type.needRemark+'&typeId='+type.id+'&remark='+remark)
|
|
|
+ remarkFn(type) {
|
|
|
+ let remark = type.remark ? type.remark : '';
|
|
|
+ this.$common.to('/pages/onely-disinfect/add-remark?needRemark=' + type.needRemark + '&typeId=' + type.id +
|
|
|
+ '&remark=' + remark)
|
|
|
},
|
|
|
- handlerRemark(type){
|
|
|
- let typeList=this.typeList;
|
|
|
- typeList.filter(obj=>type.typeId==obj.id).forEach(obj=>obj.remark=type.remark)
|
|
|
+ handlerRemark(type) {
|
|
|
+ let typeList = this.typeList;
|
|
|
+ typeList.filter(obj => type.typeId == obj.id).forEach(obj => obj.remark = type.remark)
|
|
|
},
|
|
|
addCar() {
|
|
|
this.car.list.push({
|
|
@@ -250,9 +250,11 @@
|
|
|
type.price = '';
|
|
|
},
|
|
|
showSelect(item) {
|
|
|
- this.columns = [];
|
|
|
- this.columns.push(item.items);
|
|
|
- this.show = true;
|
|
|
+ if (this.validBefore()) {
|
|
|
+ this.columns = [];
|
|
|
+ this.columns.push(item.items);
|
|
|
+ this.show = true;
|
|
|
+ }
|
|
|
},
|
|
|
confirmFn(e) {
|
|
|
let selects = e.value;
|
|
@@ -265,7 +267,7 @@
|
|
|
obj.itemName = item.itemName;
|
|
|
obj.inc = item.inc;
|
|
|
obj.price = item.price;
|
|
|
- obj.needRemark=item.needRemark;
|
|
|
+ obj.needRemark = item.needRemark;
|
|
|
})
|
|
|
}
|
|
|
this.show = false;
|
|
@@ -378,11 +380,55 @@
|
|
|
this.car.list.splice(list.indexOf(car), 1);
|
|
|
this.filterItems();
|
|
|
},
|
|
|
+ validBefore() {
|
|
|
+ let form = this.form;
|
|
|
+ let goods = this.goods;
|
|
|
+ let needDeclare = goods.needDeclare;
|
|
|
+ let needCustomer = goods.needCustomer;
|
|
|
+ let index = this.customer.index;
|
|
|
+ if (needDeclare == 1 && !form.declareNo) {
|
|
|
+ this.$common.toast('请选择申报单');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!form.owner && goods.needOwner == 1) {
|
|
|
+ this.$common.toast('请填写货主');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let needOperateTime = goods.needOperateTime;
|
|
|
+ let operateTime = form.operateTime;
|
|
|
+ if (!operateTime && needOperateTime == '1') {
|
|
|
+ this.$common.toast('请录入作业时间');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (operateTime && operateTime.length < 12) {
|
|
|
+ this.$common.toast('请录入准确的作业时间');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let carList = this.car.list;
|
|
|
+ if (carList.length == 0) {
|
|
|
+ this.$common.toast('请录入车辆');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let needCarSize = goods.needCarSize;
|
|
|
+ let needWeight = goods.needWeight;
|
|
|
+ for (let i in carList) {
|
|
|
+ let car = carList[i];
|
|
|
+ if (needCarSize == 1 && !car.carSize) {
|
|
|
+ this.$common.toast('请补充' + car.carNo + '的规格');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (needWeight == 1 && car.carType.indexOf('重') !== -1 && !car.netWeight) {
|
|
|
+ this.$common.toast('请补充' + car.carNo + '载重');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ },
|
|
|
check() {
|
|
|
let form = this.form;
|
|
|
let goods = this.goods;
|
|
|
let needDeclare = goods.needDeclare;
|
|
|
- let needCustomer=goods.needCustomer;
|
|
|
+ let needCustomer = goods.needCustomer;
|
|
|
let index = this.customer.index;
|
|
|
if (needDeclare == 1 && !form.declareNo) {
|
|
|
this.$common.toast('请选择申报单');
|
|
@@ -398,7 +444,7 @@
|
|
|
this.$common.toast('请录入作业时间');
|
|
|
return false;
|
|
|
}
|
|
|
- if (operateTime&&operateTime.length < 12) {
|
|
|
+ if (operateTime && operateTime.length < 12) {
|
|
|
this.$common.toast('请录入准确的作业时间');
|
|
|
return false;
|
|
|
}
|
|
@@ -447,15 +493,15 @@
|
|
|
this.form.itemJson = JSON.stringify(selectList);
|
|
|
this.form.carJson = JSON.stringify(this.car.list);
|
|
|
this.form.items = null;
|
|
|
- if(needCustomer==1){
|
|
|
+ if (needCustomer == 1) {
|
|
|
let customerList = this.customer.customerList;
|
|
|
let index = this.customer.index;
|
|
|
let customer = customerList[index];
|
|
|
this.form.customerId = customer.id;
|
|
|
this.form.customerName = customer.name;
|
|
|
- }else{
|
|
|
- this.form.customerId='';
|
|
|
- this.form.customerName ='';
|
|
|
+ } else {
|
|
|
+ this.form.customerId = '';
|
|
|
+ this.form.customerName = '';
|
|
|
}
|
|
|
this.form.goodsId = this.goods.id;
|
|
|
this.form.goodsName = this.goods.name;
|