5.15
This commit is contained in:
parent
4529931416
commit
39fee5e0b3
|
|
@ -94,7 +94,7 @@
|
|||
</template>
|
||||
</vxe-form>
|
||||
<!-- 表格区 -->
|
||||
<div class="gridPanel">
|
||||
<div class="">
|
||||
<vxe-grid ref='xGrid' v-bind="gridOptions">
|
||||
|
||||
<!-- =============================== 表格列 自动生成 Start =============================== -->
|
||||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<div @click="nowIndex = index">
|
||||
<vxe-form :data="item" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign">
|
||||
<vxe-form-item v-for="(item,index) in train_numberOptions.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender">
|
||||
<vxe-form-item v-for="(i,idx) in train_numberOptions.items" :title="i.title" :field="i.field" :span="i.span" :key="idx" :item-render="i.itemRender" :visible="isShow2(i,index)">
|
||||
</vxe-form-item>
|
||||
</vxe-form>
|
||||
</div>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<vxe-form :data="formOptions.data" ref="xForm1" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" titleColon>
|
||||
<!-- =========================== 自定义区域 Start ======================= -->
|
||||
<vxe-form-item v-for="(item,index) in driver_subsidyOptions.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender" :visible="isShow(item)">
|
||||
<vxe-form-item v-for="(item,index) in driver_subsidyOptions.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender" >
|
||||
<div v-if="item.isTitle" class="Htitle">
|
||||
<div class="left-line"></div>
|
||||
<p class="Htitle-p">
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
<vxe-form :data="formOptions.data" ref="xForm2" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" titleColon>
|
||||
<!-- =========================== 自定义区域 Start ======================= -->
|
||||
<vxe-form-item v-for="(item,index) in formOptions3.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender" :visible="isShow(item)">
|
||||
<vxe-form-item v-for="(item,index) in formOptions3.items" :title="item.title" :field="item.field" :span="item.span" :key="index" :item-render="item.itemRender">
|
||||
<div v-if="item.isTitle" class="Htitle">
|
||||
<div class="left-line"></div>
|
||||
<p class="Htitle-p">
|
||||
|
|
@ -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() {
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
</a-descriptions>
|
||||
|
||||
<a-tabs default-active-key="1" size="large">
|
||||
<a-tab-pane key="1" tab="货车收入列表">
|
||||
<a-tab-pane key="1" tab="货车收入列表" style="min-height: 400px;">
|
||||
<TruckIncomeList :ListUrl="TruckIncomeList" :ListUrlData="TSelectData" :ListFieldName="TSelectDataFieldName"
|
||||
:Columns="this.$data.Tcolumns" :truckID="truckID">
|
||||
</TruckIncomeList>
|
||||
|
|
@ -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 ===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ export default {
|
|||
export: true, // 是否显示导出按钮
|
||||
custom: true, // 是否显示自定义列按钮
|
||||
slots: {
|
||||
buttons: 'toolbar_buttons' // 自定义插槽
|
||||
buttons: 'toolbar_buttons', // 自定义插槽
|
||||
}
|
||||
},
|
||||
columns: this.Columns, // 表格列配置
|
||||
|
|
|
|||
Loading…
Reference in New Issue