diff --git a/src/pages/Middle/transport/Custom/Custom/Detail.vue b/src/pages/Middle/transport/Custom/Custom/Detail.vue index 21f348a..8530712 100644 --- a/src/pages/Middle/transport/Custom/Custom/Detail.vue +++ b/src/pages/Middle/transport/Custom/Custom/Detail.vue @@ -94,7 +94,7 @@ -
+
@@ -289,6 +289,14 @@ export default { { field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, // 出车公里数 { field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 250 }, // 出车备注 + { field: 'accessories_fee', align: 'center', sortable: true, title: '配件费', width: 120 }, // 配件费 + { field: 'repair_fee', align: 'center', sortable: true, title: '维修费', width: 120 }, // 维修费 + { field: 'electric_fee', align: 'center', sortable: true, title: '电器费', width: 120 }, // 电器费 + { field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, // 轮胎费 + { field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, // 轮胎工费 + { field: 'other_fee', align: 'center', sortable: true, title: '其他费用', width: 120 }, // 其他费用 + { field: 'truck_profit', align: 'center', sortable: true, title: '车利润', width: 120 }, // 车利润 + { field: 'material_profit', align: 'center', sortable: true, title: '土利润', width: 120 }, // 土利润 { field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right', align: 'center', diff --git a/src/pages/Middle/transport/TrainNumber/TrainNumber/Edit.vue b/src/pages/Middle/transport/TrainNumber/TrainNumber/Edit.vue index 9fa3178..85ebb6b 100644 --- a/src/pages/Middle/transport/TrainNumber/TrainNumber/Edit.vue +++ b/src/pages/Middle/transport/TrainNumber/TrainNumber/Edit.vue @@ -29,7 +29,7 @@
- +
@@ -39,7 +39,7 @@ - +

@@ -159,7 +159,7 @@ - +

@@ -219,6 +219,7 @@ export default { TrainNumberList: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/list`, // 车次列表 TrainNumberSearch: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/search`, // 车次搜索 TrainNumberDetail: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/detail`, // 车次详情 + SoilQualityMaterialDetail:`${BASE_URL.BASE_URL}/SoilQualityMaterial/v1/soil/quality/material/detail`, // 获取物料详情,别名 TrainNumberCreate: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/create`, // 创建车次 TrainNumberUpdate: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/update`, // 更新车次 TrainNumberDelete: `${BASE_URL.BASE_URL}/TrainNumber/v1/train/number/detele`, // 删除车次 @@ -272,6 +273,8 @@ export default { supplier_id: 0, supplier_name: "", soil_quality_material_id: 0, + soil_name_1:'', + soil_name_2:'', outbound_soil_quality_material_id: 0, warehousing_soil_quality_material_id: 0, outbound_remark: "", @@ -496,8 +499,7 @@ export default { textField: "name", listdataFieldName: 'Truck', dataUrl: `${BASE_URL.BASE_URL}/Truck/v1/truck/list`, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.truck_id = data.id; this.formOptions.data.current_distance = data.current_distance; this.formOptions.data.end_mileage = data.current_distance; @@ -517,7 +519,6 @@ export default { listdataFieldName: 'MesStaff', dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`, onDataChanged: ({data}) => { - console.log(data) this.formOptions.data.driver_id = data.id; } } @@ -566,9 +567,9 @@ export default { } ], }, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.custom_id = data.id; + this.handleSoilName(); } } } @@ -590,9 +591,9 @@ export default { ], }, dataUrl: `${BASE_URL.BASE_URL}/Custom/v1/custom/list`, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.supplier_id = data.id; + this.handleSoilName(); } } } @@ -614,17 +615,17 @@ export default { // ], // }, dataUrl: `${BASE_URL.BASE_URL}/SoilQualityMaterial/v1/soil/quality/material/list`, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.soil_quality_material_id = data.id; this.formOptions.data.buy_unit_price = data.price; this.formOptions.data.unit_price = data.price; + this.handleSoilName(); } } } }}, - - + {field: 'soil_name_1', title: '物料别名(客户)', span: 8,isSoil1:true, itemRender: {name: '$input', props: {type: "",readonly:true}}}, + {field: 'soil_name_2', title: '物料别名(供应商)', span: 8,isSoil2:true, itemRender: {name: '$input', props: {type: "",readonly:true}}}, // {field: 'outbound_soil_quality_material_id', title: '出库物料土质', span: 8, itemRender: {name: '$input'}}, {field: 'supplier_outbound_tonnage',title: '供应商出库吨位',span: 8,itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleBuyTotalPrice }}}, @@ -701,9 +702,9 @@ export default { } ], }, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.train_number[this.nowIndex].custom_id = data.id; + this.handleSoilName1(); } } } @@ -725,9 +726,9 @@ export default { ], }, dataUrl: `${BASE_URL.BASE_URL}/Custom/v1/custom/list`, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.train_number[this.nowIndex].supplier_id = data.id; + this.handleSoilName1(); } } } @@ -740,15 +741,17 @@ export default { textField: "name", listdataFieldName: 'SoilQualityMaterial', dataUrl: `${BASE_URL.BASE_URL}/SoilQualityMaterial/v1/soil/quality/material/list`, - onDataChanged: ({value,data}) => { - console.log(value,data) + onDataChanged: ({data}) => { this.formOptions.data.train_number[this.nowIndex].soil_quality_material_id = data.id; this.formOptions.data.train_number[this.nowIndex].buy_unit_price = data.price; this.formOptions.data.train_number[this.nowIndex].unit_price = data.price; + this.handleSoilName1(); } } } }}, + {field: 'soil_name_1', title: '物料别名(客户)', span: 8,isSoil1:true, itemRender: {name: '$input', props: {type: "",readonly:true} }}, + {field: 'soil_name_2', title: '物料别名(供应商)', span: 8,isSoil2:true, itemRender: {name: '$input', props: {type: "",readonly:true}}}, {field: 'supplier_outbound_tonnage',title: '供应商出库吨位',span: 8,itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleBuyTotalPrice1 }}}, {field: 'buy_unit_price', title: '购入单价', span: 8, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber,blur:this.handleBuyTotalPrice1 } }}, {field: 'buy_total_price', title: '购入总价', span: 8, itemRender: {name: '$input', props: {type: "number"}, events: { input: this.handleInputNumber }}}, @@ -902,7 +905,7 @@ export default { this.$openPage('/TrainNumber/TrainNumberList') }, isShow(item){ - if(!item.isOutsourcing && !item.isNeedOutbound){ + if(!item.isOutsourcing && !item.isNeedOutbound && !item.isSoil1 && !item.isSoil2){ return true } if(item.isOutsourcing && this.formOptions.data.is_outsourcing == 1){ @@ -910,7 +913,28 @@ export default { } if(item.isNeedOutbound && this.formOptions.data.is_need_outbound == 1){ return true - }else{ + } + if(item.isSoil1 && this.formOptions.data.custom_name && this.formOptions.data.soil_quality_material){ + return true + } + if(item.isSoil2 && this.formOptions.data.supplier_name && this.formOptions.data.soil_quality_material){ + return true + } + else{ + return false + } + }, + isShow2(item,index){ + if(!item.isSoil1 && !item.isSoil2){ + return true + } + if(item.isSoil1 && this.formOptions.data.train_number[index].custom_name && this.formOptions.data.train_number[index].soil_quality_material){ + return true + } + if(item.isSoil2 && this.formOptions.data.train_number[index].supplier_name && this.formOptions.data.train_number[index].soil_quality_material){ + return true + } + else{ return false } }, @@ -921,6 +945,8 @@ export default { custom_name: "", supplier_id: null, supplier_name: "", + soil_name_1:'', + soil_name_2:'', soil_quality_material_id: null, supplier_outbound_tonnage:0, //购入单价 @@ -955,7 +981,6 @@ export default { pageDelete(row,field,table) { const $table = this.$refs[table]; - console.log(this.formOptions.data[field]) if (this.formOptions.data[field].length == 1) { this.$mk.error("至少保留一行"); return; @@ -1002,6 +1027,63 @@ export default { handleOilTotalPrice(){ this.formOptions.data.oil_consumption['oil_consumption_total_price'] = this.formOptions.data.oil_consumption['oil_consumption_number']*this.formOptions.data.oil_consumption['oil_consumption_price']; }, + + handleSoilName(){ + if(this.formOptions.data.custom_id && this.formOptions.data.soil_quality_material_id){ + let postdata = { + custom_id: this.formOptions.data.custom_id, + id: this.formOptions.data.soil_quality_material_id + } + this.$mk.post({ + url: this.actions.SoilQualityMaterialDetail, + data: postdata, + useBigInt: true, + }).then((res) => { + this.formOptions.data.soil_name_1 = res.data.soil_quality_material.name + }) + } + if(this.formOptions.data.supplier_name&&this.formOptions.data.soil_quality_material_id){ + let postdata = { + custom_id: this.formOptions.data.supplier_id, + id: this.formOptions.data.soil_quality_material_id + } + this.$mk.post({ + url: this.actions.SoilQualityMaterialDetail, + data: postdata, + useBigInt: true, + }).then((res) => { + this.formOptions.data.soil_name_2 = res.data.soil_quality_material.name + }) + } + }, + handleSoilName1(){ + if(this.formOptions.data.train_number[this.nowIndex].custom_id && this.formOptions.data.train_number[this.nowIndex].soil_quality_material_id){ + let postdata = { + custom_id: this.formOptions.data.train_number[this.nowIndex].custom_id, + id: this.formOptions.data.train_number[this.nowIndex].soil_quality_material_id + } + this.$mk.post({ + url: this.actions.SoilQualityMaterialDetail, + data: postdata, + useBigInt: true, + }).then((res) => { + this.formOptions.data.train_number[this.nowIndex].soil_name_1 = res.data.soil_quality_material.name + }) + } + if(this.formOptions.data.train_number[this.nowIndex].supplier_name&&this.formOptions.data.train_number[this.nowIndex].soil_quality_material_id){ + let postdata = { + custom_id: this.formOptions.data.train_number[this.nowIndex].supplier_id, + id: this.formOptions.data.train_number[this.nowIndex].soil_quality_material_id + } + this.$mk.post({ + url: this.actions.SoilQualityMaterialDetail, + data: postdata, + useBigInt: true, + }).then((res) => { + this.formOptions.data.train_number[this.nowIndex].soil_name_2 = res.data.soil_quality_material.name + }) + } + }, // 保存 ok() { diff --git a/src/pages/Middle/transport/TrainNumber/TrainNumber/List.vue b/src/pages/Middle/transport/TrainNumber/TrainNumber/List.vue index f512677..f36eee7 100644 --- a/src/pages/Middle/transport/TrainNumber/TrainNumber/List.vue +++ b/src/pages/Middle/transport/TrainNumber/TrainNumber/List.vue @@ -324,7 +324,16 @@ export default { // }, // 创建时间 { field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, // 出车公里数 - { field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 250 }, // 出车备注 + { field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 120 }, // 出车备注 + { field: 'accessories_fee', align: 'center', sortable: true, title: '配件费', width: 120 }, // 配件费 + { field: 'repair_fee', align: 'center', sortable: true, title: '维修费', width: 120 }, // 维修费 + { field: 'electric_fee', align: 'center', sortable: true, title: '电器费', width: 120 }, // 电器费 + { field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, // 轮胎费 + { field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, // 轮胎工费 + { field: 'other_fee', align: 'center', sortable: true, title: '其他费用', width: 120 }, // 其他费用 + { field: 'truck_profit', align: 'center', sortable: true, title: '车利润', width: 120 }, // 车利润 + { field: 'material_profit', align: 'center', sortable: true, title: '土利润', width: 120 }, // 土利润 + { field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right', align: 'center', diff --git a/src/pages/Middle/transport/Truck/Truck/Detail.vue b/src/pages/Middle/transport/Truck/Truck/Detail.vue index 42f39ab..ba9015b 100644 --- a/src/pages/Middle/transport/Truck/Truck/Detail.vue +++ b/src/pages/Middle/transport/Truck/Truck/Detail.vue @@ -50,7 +50,7 @@ - + @@ -129,26 +129,38 @@ export default { { field: 'is_outsourcing', align: 'center', sortable: true, title: '类型', width: 80, slots: { default: 'is_outsourcing' } - }, // 是否委外 - // {field: 'is_need_outbound', sortable: true, title: '出车', width: 70}, // 是否需要出车 + }, + // 是否委外 + {field: 'is_need_outbound', sortable: true, title: '出车', width: 70}, // 是否需要出车 { field: 'outbound_date', align: 'center', sortable: true, formatter: 'formatDate', title: '出车日期', width: 100 }, // 出车日期 { field: 'return_date', align: 'center', sortable: true, formatter: 'formatDate', title: '回车日期', width: 100 }, // 回车日期 - + { + field: 'is_oil', align: 'center', sortable: true, title: '加油', width: 70, + slots: { default: 'is_oil' } + }, // 是否加油 { field: 'outbound_mileage', align: 'center', sortable: true, title: '出车公里数', width: 120 }, // 出车公里数 { field: 'outbound_remark', align: 'center', sortable: true, title: '出车备注', width: 250 }, // 出车备注 - // { - // field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right', - // align: 'center', - // }, // 收入 - // { - // field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right', - // align: 'center', - // }, // 成本 - // { - // field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right', - // align: 'center', - // }, // 利润 + { field: 'accessories_fee', align: 'center', sortable: true, title: '配件费', width: 120 }, // 配件费 + { field: 'repair_fee', align: 'center', sortable: true, title: '维修费', width: 120 }, // 维修费 + { field: 'electric_fee', align: 'center', sortable: true, title: '电器费', width: 120 }, // 电器费 + { field: 'tire_cost', align: 'center', sortable: true, title: '轮胎费', width: 120 }, // 轮胎费 + { field: 'tire_fee', align: 'center', sortable: true, title: '轮胎工费', width: 120 }, // 轮胎工费 + { field: 'other_fee', align: 'center', sortable: true, title: '其他费用', width: 120 }, // 其他费用 + { field: 'truck_profit', align: 'center', sortable: true, title: '车利润', width: 120 }, // 车利润 + { field: 'material_profit', align: 'center', sortable: true, title: '土利润', width: 120 }, // 土利润 + { + field: 'income', sortable: true, title: '收入', width: 80, fixed: 'right', + align: 'center', + }, // 收入 + { + field: 'cost', sortable: true, title: '成本', width: 80, fixed: 'right', + align: 'center', + }, // 成本 + { + field: 'profit', sortable: true, title: '利润', width: 80, fixed: 'right', + align: 'center', + }, // 利润 // =============================== 表格列 自动生成 Start =============================== diff --git a/src/pages/Middle/transport/Truck/Truck/zkTableList.vue b/src/pages/Middle/transport/Truck/Truck/zkTableList.vue index e17a07b..fc75ba4 100644 --- a/src/pages/Middle/transport/Truck/Truck/zkTableList.vue +++ b/src/pages/Middle/transport/Truck/Truck/zkTableList.vue @@ -126,7 +126,7 @@ export default { export: true, // 是否显示导出按钮 custom: true, // 是否显示自定义列按钮 slots: { - buttons: 'toolbar_buttons' // 自定义插槽 + buttons: 'toolbar_buttons', // 自定义插槽 } }, columns: this.Columns, // 表格列配置