|
@@ -231,7 +231,7 @@
|
|
|
forData3:o,
|
|
forData3:o,
|
|
|
forData4:data.data.wasteOrderDetailItemVos[i].quantity,
|
|
forData4:data.data.wasteOrderDetailItemVos[i].quantity,
|
|
|
forData5:self.dialogOptionForList[o].unit,
|
|
forData5:self.dialogOptionForList[o].unit,
|
|
|
- forData6:0,
|
|
|
|
|
|
|
+ forData6:data.data.wasteOrderDetailItemVos[i].weight?data.data.wasteOrderDetailItemVos[i].weight:0,
|
|
|
forList:self.dialogOptionForList,
|
|
forList:self.dialogOptionForList,
|
|
|
}
|
|
}
|
|
|
list.push(JSON.parse(JSON.stringify(obj)))
|
|
list.push(JSON.parse(JSON.stringify(obj)))
|
|
@@ -256,11 +256,36 @@
|
|
|
},
|
|
},
|
|
|
//选中类型
|
|
//选中类型
|
|
|
forChange(index,e){
|
|
forChange(index,e){
|
|
|
- this.$set(this.addForm.formData4[index],'forData1',this.addForm.formData4[index].forList[e.detail.value].id);
|
|
|
|
|
- this.$set(this.addForm.formData4[index],'forData2',this.addForm.formData4[index].forList[e.detail.value].wasteName);
|
|
|
|
|
- this.$set(this.addForm.formData4[index],'forData5',this.addForm.formData4[index].forList[e.detail.value].unit);
|
|
|
|
|
- this.$set(this.addForm.formData4[index],'forData3',e.detail.value);
|
|
|
|
|
- this.filtrateList();
|
|
|
|
|
|
|
+ console.log('e',e);
|
|
|
|
|
+ let self = this;
|
|
|
|
|
+ if(self.addForm.formData4[index].forList[e.detail.value].remarkEnable){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '确认添加?',
|
|
|
|
|
+ content: self.addForm.formData4[index].forList[e.detail.value].remark,
|
|
|
|
|
+ cancelColor: "#999",
|
|
|
|
|
+ confirmColor: "#0183FA",
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if(res.confirm){
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData1',self.addForm.formData4[index].forList[e.detail.value].id);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData2',self.addForm.formData4[index].forList[e.detail.value].wasteName);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData5',self.addForm.formData4[index].forList[e.detail.value].unit);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData3',e.detail.value);
|
|
|
|
|
+ self.filtrateList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData1',self.addForm.formData4[index].forList[e.detail.value].id);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData2',self.addForm.formData4[index].forList[e.detail.value].wasteName);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData5',self.addForm.formData4[index].forList[e.detail.value].unit);
|
|
|
|
|
+ self.$set(self.addForm.formData4[index],'forData3',e.detail.value);
|
|
|
|
|
+ self.filtrateList();
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.$set(this.addForm.formData4[index],'forData1',this.addForm.formData4[index].forList[e.detail.value].id);
|
|
|
|
|
+ // this.$set(this.addForm.formData4[index],'forData2',this.addForm.formData4[index].forList[e.detail.value].wasteName);
|
|
|
|
|
+ // this.$set(this.addForm.formData4[index],'forData5',this.addForm.formData4[index].forList[e.detail.value].unit);
|
|
|
|
|
+ // this.$set(this.addForm.formData4[index],'forData3',e.detail.value);
|
|
|
|
|
+ // this.filtrateList();
|
|
|
},
|
|
},
|
|
|
//单位值加减
|
|
//单位值加减
|
|
|
reductionAdd(type,index){
|
|
reductionAdd(type,index){
|
|
@@ -301,18 +326,43 @@
|
|
|
//删除类型
|
|
//删除类型
|
|
|
reductionItemButton(index){
|
|
reductionItemButton(index){
|
|
|
let self = this;
|
|
let self = this;
|
|
|
- uni.showModal({
|
|
|
|
|
- // title: '确认要退出吗?',
|
|
|
|
|
- content: '确认删除该类型?',
|
|
|
|
|
- cancelColor: "#999",
|
|
|
|
|
- confirmColor: "#0183FA",
|
|
|
|
|
- success: function(res) {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- self.addForm.formData4.splice(index,1);
|
|
|
|
|
- self.filtrateList();
|
|
|
|
|
- } else if (res.cancel) {}
|
|
|
|
|
|
|
+ let num = 0;
|
|
|
|
|
+ for(let i=0;i<self.dialogOptionForList.length;i++){
|
|
|
|
|
+ if(self.dialogOptionForList[i].id == this.addForm.formData4[index].forData1){
|
|
|
|
|
+ if(self.dialogOptionForList[i].remarkEnable){
|
|
|
|
|
+ num++
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '确认删除?',
|
|
|
|
|
+ content: self.dialogOptionForList[i].remark,
|
|
|
|
|
+ cancelColor: "#999",
|
|
|
|
|
+ confirmColor: "#0183FA",
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if(res.confirm){
|
|
|
|
|
+ self.addForm.formData4.splice(index,1);
|
|
|
|
|
+ self.filtrateList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ num++
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ content: '确认删除该类型?',
|
|
|
|
|
+ cancelColor: "#999",
|
|
|
|
|
+ confirmColor: "#0183FA",
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ self.addForm.formData4.splice(index,1);
|
|
|
|
|
+ self.filtrateList();
|
|
|
|
|
+ } else if (res.cancel) {}
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if(num == 0){
|
|
|
|
|
+ self.addForm.formData4.splice(index,1);
|
|
|
|
|
+ self.filtrateList();
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 图片上传
|
|
// 图片上传
|