diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/components/guadMap/index.vue b/src/components/guadMap/index.vue index 6a0fd56..a68977e 100644 --- a/src/components/guadMap/index.vue +++ b/src/components/guadMap/index.vue @@ -89,29 +89,29 @@ fetchPositionData() { getDevicePosition() .then((res) => { - // this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 - this.deviceList = [ - { - deviceName: "燃气灶", - lat: "39.97", - lon: "116.3", - }, - { - deviceName: "燃气灶", - lat: "39.93", - lon: "116.15", - }, - { - deviceName: "燃气灶", - lat: "39.8", - lon: "116.22", - }, - { - deviceName: "燃气灶", - lat: "39.74", - lon: "116.33", - }, - ]; + this.deviceList = res.data; // 有数据之后可以直接使用暂时模拟数据 + // this.deviceList = [ + // { + // deviceName: "燃气灶", + // lat: "39.97", + // lon: "116.3", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.93", + // lon: "116.15", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.8", + // lon: "116.22", + // }, + // { + // deviceName: "燃气灶", + // lat: "39.74", + // lon: "116.33", + // }, + // ]; // 初始化地图 this.initMap(); }) diff --git a/src/components/mycomponent/dialog/server/operationAddDialog.vue b/src/components/mycomponent/dialog/server/operationAddDialog.vue index dfefe42..d436541 100644 --- a/src/components/mycomponent/dialog/server/operationAddDialog.vue +++ b/src/components/mycomponent/dialog/server/operationAddDialog.vue @@ -11,13 +11,14 @@ width="300px" class="inputWidth" style="justify-content: space-between;" + v-model="form.date" />
- +
- +
- +
@@ -100,16 +102,37 @@ RedStar, InputVue }, + data(){ + return{ + form:{ + date:'', // 服务运营编号 + name:'', // 服务名称 + address:'', // 收费 + address1:'', // 优惠 + address2:'', // 日期 + mark:'', // 备注 + } + } + }, props: { isShowInfo: { type: Boolean, default: true - } + }, }, methods: { close() { this.$emit('close') - } + }, + init(detail){ + if(detail.name){ + this.form.address = detail.address + this.form.address1 = detail.address1 + this.form.address2 = detail.address2 + this.form.date = detail.date + this.form.name = detail.name + } + }, } } diff --git a/src/views/business/historyBusiness.vue b/src/views/business/historyBusiness.vue index bddce18..4398baa 100644 --- a/src/views/business/historyBusiness.vue +++ b/src/views/business/historyBusiness.vue @@ -13,7 +13,7 @@
预计工期
- +
diff --git a/src/views/business/report.vue b/src/views/business/report.vue index 33c1a3d..d833399 100644 --- a/src/views/business/report.vue +++ b/src/views/business/report.vue @@ -316,12 +316,12 @@
-
+
+
添加项目需求
-
@@ -421,22 +421,27 @@ }, methods: { save() { - this.addInfo.productList = { + if(this.valiateForm()){ + this.addInfo.productList = { productCode: this.addInfo.productList.productCode, productQuantity: this.addInfo.productList.productQuantity, productPrice: this.addInfo.productList.productPrice, productName: '' } add(this.addInfo).then(res => { - console.log(res) - if (res) { + this.setData() this.$message({ message: '保存成功', type: 'success' }) - } - }) - this.setData() + }) + } else { + this.$message({ + message: '请先完整填写报备信息', + type: 'error' + }) + } + }, close() { this.setData() @@ -462,7 +467,6 @@ this.form.countyList = res }) }, - handleAddBtn() { const obj = {} obj.brandName = '' @@ -525,6 +529,12 @@ this.$set(this.showEdit, index, false) // vue添加属性的方法 } }) + row.productCode = this.addInfo.productList.productCode + row.brandName = this.brandName + console.log(this.categoryIds) + row.categoryIds = this.categoryIds + row.productQuantity = this.addInfo.productList.productQuantity + row.productPrice = this.addInfo.productList.productPrice }, setData() { this.addInfo = { @@ -553,6 +563,17 @@ agentPhone: '', productList: [] } + }, + valiateForm() { + let arr = [] + for(var item in this.addInfo) { + if(this.addInfo[item]){ + arr.push(1) + }else{ + arr.push(0) + } + } + return arr.every(item => item === 1) } } } @@ -568,7 +589,7 @@ .report-from { .from-title { - font-size: 22px; + font-size: 16px; font-weight: bold; background-color: #28739e; color: white; diff --git a/src/views/operation/retailerList.vue b/src/views/operation/retailerList.vue index 4f061c8..2964d08 100644 --- a/src/views/operation/retailerList.vue +++ b/src/views/operation/retailerList.vue @@ -68,12 +68,11 @@
- - - - - - + + @@ -103,21 +102,6 @@ address3: '0.5', address4: '每天必做' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { @@ -125,7 +109,8 @@ label: '黄金糕' } ], - value: '' + value: '', + input:'' } }, methods: { diff --git a/src/views/operation/watchList.vue b/src/views/operation/watchList.vue index 1b06442..af68692 100644 --- a/src/views/operation/watchList.vue +++ b/src/views/operation/watchList.vue @@ -129,21 +129,6 @@ address4: '100元', address5: '是' } - // { - // date: '2016-05-04', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1517 弄' - // }, - // { - // date: '2016-05-01', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1519 弄' - // }, - // { - // date: '2016-05-03', - // name: '王小虎', - // address: '上海市普陀区金沙江路 1516 弄' - // } ], options: [ { diff --git a/src/views/order/orderShop.vue b/src/views/order/orderShop.vue index 1874202..36c7c50 100644 --- a/src/views/order/orderShop.vue +++ b/src/views/order/orderShop.vue @@ -2,30 +2,52 @@