|
@@ -257,30 +257,32 @@ export default {
|
|
}).catch((err) => { });
|
|
}).catch((err) => { });
|
|
},
|
|
},
|
|
initData () {
|
|
initData () {
|
|
|
|
+
|
|
this.axios({
|
|
this.axios({
|
|
method: 'get',
|
|
method: 'get',
|
|
url: '/api/supply_material_detail',
|
|
url: '/api/supply_material_detail',
|
|
params: {
|
|
params: {
|
|
supply_id: this.$route.query.supply_id
|
|
supply_id: this.$route.query.supply_id
|
|
}
|
|
}
|
|
- }).then((res) => {
|
|
|
|
|
|
+ }).then((res) => {
|
|
this.searchData.code = res.data.code
|
|
this.searchData.code = res.data.code
|
|
this.searchData.title = res.data.title
|
|
this.searchData.title = res.data.title
|
|
this.tableData = res.data.list
|
|
this.tableData = res.data.list
|
|
this.tableData.forEach(element => {
|
|
this.tableData.forEach(element => {
|
|
element.tax_price = (1 * element.price * (1 + element.fax * 1 / 100)).toFixed(2)
|
|
element.tax_price = (1 * element.price * (1 + element.fax * 1 / 100)).toFixed(2)
|
|
});
|
|
});
|
|
- }).catch((err) => { });
|
|
|
|
|
|
+ }).catch((err) => { });
|
|
},
|
|
},
|
|
handleSet (type, row, index) {
|
|
handleSet (type, row, index) {
|
|
switch (type) {
|
|
switch (type) {
|
|
case 1:
|
|
case 1:
|
|
this.axios({
|
|
this.axios({
|
|
method: 'post',
|
|
method: 'post',
|
|
- url: '/api/supply_material_add',
|
|
|
|
|
|
+ url: '/api/supply_material_edit',
|
|
data: {
|
|
data: {
|
|
supply_id: this.$route.query.supply_id ? this.$route.query.supply_id : this.searchData.id,
|
|
supply_id: this.$route.query.supply_id ? this.$route.query.supply_id : this.searchData.id,
|
|
- supply_material: this.tableData
|
|
|
|
|
|
+ supply_material: this.tableData,
|
|
|
|
+ state: this.$route.query.state
|
|
}
|
|
}
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.$Message.success(res.msg);
|
|
this.$Message.success(res.msg);
|