|
@@ -78,7 +78,7 @@
|
|
|
@click="modifyState"
|
|
|
>
|
|
|
{{
|
|
|
- goodsForm.status === 1 ? '调度' : goodsForm.status === 2 ? '派车' : goodsForm.status === 3 ? '受理' : goodsForm.status === 4 ? '确认完工' : goodsForm.status === 6 ? '确认到厂' : '未知状态:' + goodsForm.status
|
|
|
+ goodsForm.status === 1 ? '调度' : goodsForm.status === 2 ? '派车' : goodsForm.status === 3 ? '受理' : goodsForm.status === 4 ? '确认完工' : goodsForm.status === 6 ? '确认到厂' : '未知状态:' + goodsForm.status
|
|
|
}}
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -144,12 +144,12 @@
|
|
|
<e-crop-jump label="公司名称" corp-type="KH" :value="goodsForm.corpName"></e-crop-jump>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="corpId">
|
|
|
-<!-- <crop-select-->
|
|
|
-<!-- :disabled="goodsForm.status !== 0"-->
|
|
|
-<!-- v-model="goodsForm.corpId"-->
|
|
|
-<!-- @getCorpData="getCorpData"-->
|
|
|
-<!-- :corpType="'KH'"-->
|
|
|
-<!-- ></crop-select>-->
|
|
|
+ <!-- <crop-select-->
|
|
|
+ <!-- :disabled="goodsForm.status !== 0"-->
|
|
|
+ <!-- v-model="goodsForm.corpId"-->
|
|
|
+ <!-- @getCorpData="getCorpData"-->
|
|
|
+ <!-- :corpType="'KH'"-->
|
|
|
+ <!-- ></crop-select>-->
|
|
|
<e-crop-select
|
|
|
v-model="goodsForm.corpId"
|
|
|
:name.sync="goodsForm.corpName"
|
|
@@ -165,7 +165,8 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="salesman">
|
|
|
- <el-select v-model="goodsForm.salesman" filterable clearable placeholder="请选择" :disabled="goodsForm.status !== 0"
|
|
|
+ <el-select v-model="goodsForm.salesman" filterable clearable placeholder="请选择"
|
|
|
+ :disabled="goodsForm.status !== 0"
|
|
|
@change="changeSelect">
|
|
|
<el-option
|
|
|
v-for="item in salesmanList"
|
|
@@ -441,8 +442,10 @@
|
|
|
property="corpId"
|
|
|
label="货运地点"
|
|
|
align="center"
|
|
|
- :render-header="customTitle"
|
|
|
width="280">
|
|
|
+ <template slot="header" slot-scope="{ column, $index }">
|
|
|
+ <e-crop-jump :label="column.label" corp-type="GC"></e-crop-jump><span style="color:#F56C6C">*</span>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
<crop-select
|
|
|
:corpType="'GC'"
|
|
@@ -507,7 +510,9 @@
|
|
|
width="180"
|
|
|
label="货物体积">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2" @change="calculateFreight()"></el-input-number>
|
|
|
+ <el-input-number :controls="false" v-model="scope.row.volume" size="small"
|
|
|
+ :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2"
|
|
|
+ @change="calculateFreight()"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -664,8 +669,10 @@
|
|
|
property="corpId"
|
|
|
label="货运地点"
|
|
|
align="center"
|
|
|
- :render-header="customTitle"
|
|
|
width="280">
|
|
|
+ <template slot="header" slot-scope="{ column, $index }">
|
|
|
+ <e-crop-jump :label="column.label" corp-type="GC"></e-crop-jump><span style="color:#F56C6C">*</span>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
<crop-select
|
|
|
:corpType="'GC'"
|
|
@@ -733,7 +740,9 @@
|
|
|
width="180"
|
|
|
label="货物体积">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input-number :controls="false" v-model="scope.row.volume" size="small" :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2" @change="calculateFreight()"></el-input-number>
|
|
|
+ <el-input-number :controls="false" v-model="scope.row.volume" size="small"
|
|
|
+ :disabled="goodsForm.status !== 0" placeholder="请输入内容" precision="2"
|
|
|
+ @change="calculateFreight()"></el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -854,10 +863,13 @@
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</span>
|
|
|
- <trade-card title="杂费明细" v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('客户') !== -1 || roleName.indexOf('admin') !== -1 || roleName.indexOf('车队') !== -1">
|
|
|
+ <trade-card title="杂费明细"
|
|
|
+ v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('客户') !== -1 || roleName.indexOf('admin') !== -1 || roleName.indexOf('车队') !== -1">
|
|
|
<el-tabs v-model="activeIndex" @tab-click="handleSelect">
|
|
|
- <el-tab-pane label="应收" name="1" v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('客户') !== -1 || roleName.indexOf('admin') !== -1"></el-tab-pane>
|
|
|
- <el-tab-pane label="应付" name="2" v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('admin') !== -1 || roleName.indexOf('车队') !== -1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="应收" name="1"
|
|
|
+ v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('客户') !== -1 || roleName.indexOf('admin') !== -1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="应付" name="2"
|
|
|
+ v-if="roleName.indexOf('平台') !== -1 || roleName.indexOf('admin') !== -1 || roleName.indexOf('车队') !== -1"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<avue-crud
|
|
|
v-if="activeIndex === '1'"
|
|
@@ -1056,26 +1068,26 @@ export default {
|
|
|
watch: {
|
|
|
goodsForm: {
|
|
|
handler(newValue, oldValue) {
|
|
|
- if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
+ if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1) {
|
|
|
this.findObject(this.goodsOptionForm.column, "remarks").display = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.findObject(this.goodsOptionForm.column, "remarks").display = false
|
|
|
}
|
|
|
- if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('司机') !== -1){
|
|
|
+ if (this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('司机') !== -1) {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").display = true
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").display = false
|
|
|
}
|
|
|
- if (!this.typeTwo){
|
|
|
+ if (!this.typeTwo) {
|
|
|
// this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status === 5
|
|
|
- if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('司机') !== -1){
|
|
|
+ if (this.roleName.indexOf('客户') !== -1 || this.roleName.indexOf('司机') !== -1) {
|
|
|
this.goodsOptionFormTwo.disabled = true
|
|
|
} else {
|
|
|
if (this.goodsForm.status === 0) {
|
|
|
this.goodsOptionFormTwo.disabled = true
|
|
|
- }else if (this.goodsForm.status === 1){
|
|
|
+ } else if (this.goodsForm.status === 1) {
|
|
|
this.goodsOptionFormTwo.disabled = false
|
|
|
- if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
+ if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1) {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
@@ -1083,16 +1095,16 @@ export default {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").disabled = false
|
|
|
}
|
|
|
- } else if (this.goodsForm.status === 2){
|
|
|
+ } else if (this.goodsForm.status === 2) {
|
|
|
this.goodsOptionFormTwo.disabled = false
|
|
|
- if (this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('admin') !== -1){
|
|
|
+ if (this.roleName.indexOf('车队') !== -1 || this.roleName.indexOf('admin') !== -1) {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverTel").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").disabled = false
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = true
|
|
@@ -1100,7 +1112,7 @@ export default {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetRemarks").disabled = true
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "driverId").disabled = true
|
|
@@ -1641,7 +1653,7 @@ export default {
|
|
|
value: "dictKey"
|
|
|
},
|
|
|
prop: 'pricingUnit',
|
|
|
- change:(data)=>{
|
|
|
+ change: (data) => {
|
|
|
this.goodsForm.pricingUnit = data.value
|
|
|
this.calculateFreight(data)
|
|
|
}
|
|
@@ -1654,12 +1666,12 @@ export default {
|
|
|
label: "dictValue",
|
|
|
value: "dictValue"
|
|
|
},
|
|
|
- dicData:[{
|
|
|
- dictValue:'装货'
|
|
|
- },{
|
|
|
- dictValue:'卸货'
|
|
|
+ dicData: [{
|
|
|
+ dictValue: '装货'
|
|
|
+ }, {
|
|
|
+ dictValue: '卸货'
|
|
|
}],
|
|
|
- change:(data)=>{
|
|
|
+ change: (data) => {
|
|
|
this.goodsForm.loadingUnloading = data.value
|
|
|
this.calculateFreight(data)
|
|
|
}
|
|
@@ -1667,7 +1679,7 @@ export default {
|
|
|
label: '单价',
|
|
|
span: 6,
|
|
|
prop: 'unitPrice',
|
|
|
- change:(data)=>{
|
|
|
+ change: (data) => {
|
|
|
this.goodsForm.unitPrice = data.value
|
|
|
this.calculateFreight(data)
|
|
|
}
|
|
@@ -1675,8 +1687,8 @@ export default {
|
|
|
label: '单车运费',
|
|
|
span: 6,
|
|
|
type: 'number',
|
|
|
- controls:false,
|
|
|
- precision:2,
|
|
|
+ controls: false,
|
|
|
+ precision: 2,
|
|
|
prop: 'freightCollect'
|
|
|
}
|
|
|
// , {
|
|
@@ -2149,15 +2161,15 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
- this.activeIndex = this.roleName.indexOf('车队') !== -1?'2':'1'
|
|
|
+ this.activeIndex = this.roleName.indexOf('车队') !== -1 ? '2' : '1'
|
|
|
console.log(this.activeIndex)
|
|
|
- if (this.roleName.indexOf('客户') !== -1){
|
|
|
+ if (this.roleName.indexOf('客户') !== -1) {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").display = false
|
|
|
}
|
|
|
- if (this.roleName.indexOf('车队') !== -1){
|
|
|
+ if (this.roleName.indexOf('车队') !== -1) {
|
|
|
this.findObject(this.goodsOptionForm.column, "freightCollect").display = false
|
|
|
}
|
|
|
- if (this.roleName.indexOf('司机') !== -1){
|
|
|
+ if (this.roleName.indexOf('司机') !== -1) {
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "freightPay").display = false
|
|
|
this.findObject(this.goodsOptionForm.column, "freightCollect").display = false
|
|
|
}
|
|
@@ -2361,51 +2373,51 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//单车运费计算
|
|
|
- calculateFreight(data){
|
|
|
- if (this.goodsForm.pricingUnit && this.goodsForm.loadingUnloading && this.goodsForm.unitPrice){
|
|
|
- if (this.goodsForm.loadingUnloading == '装货'){
|
|
|
- if (this.goodsForm.pricingUnit == '体积'){
|
|
|
+ calculateFreight(data) {
|
|
|
+ if (this.goodsForm.pricingUnit && this.goodsForm.loadingUnloading && this.goodsForm.unitPrice) {
|
|
|
+ if (this.goodsForm.loadingUnloading == '装货') {
|
|
|
+ if (this.goodsForm.pricingUnit == '体积') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableData.forEach(item=>{
|
|
|
- if (item.volume){
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ if (item.volume) {
|
|
|
this.goodsForm.freightCollect += Number(item.volume) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
|
// unitPrice
|
|
|
- }else if (this.goodsForm.pricingUnit == '重量'){
|
|
|
+ } else if (this.goodsForm.pricingUnit == '重量') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableData.forEach(item=>{
|
|
|
- if (item.weight){
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ if (item.weight) {
|
|
|
this.goodsForm.freightCollect += Number(item.weight) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
|
- }else if (this.goodsForm.pricingUnit == '件数'){
|
|
|
+ } else if (this.goodsForm.pricingUnit == '件数') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableData.forEach(item=>{
|
|
|
- if (item.quantity){
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ if (item.quantity) {
|
|
|
this.goodsForm.freightCollect += Number(item.quantity) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- }else {
|
|
|
- if (this.goodsForm.pricingUnit == '体积'){
|
|
|
+ } else {
|
|
|
+ if (this.goodsForm.pricingUnit == '体积') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableDataTwo.forEach(item=>{
|
|
|
- if (item.volume){
|
|
|
+ this.tableDataTwo.forEach(item => {
|
|
|
+ if (item.volume) {
|
|
|
this.goodsForm.freightCollect += Number(item.volume) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
|
- }else if (this.goodsForm.pricingUnit == '重量'){
|
|
|
+ } else if (this.goodsForm.pricingUnit == '重量') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableDataTwo.forEach(item=>{
|
|
|
- if (item.weight){
|
|
|
+ this.tableDataTwo.forEach(item => {
|
|
|
+ if (item.weight) {
|
|
|
this.goodsForm.freightCollect += Number(item.weight) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
|
- }else if (this.goodsForm.pricingUnit == '件数'){
|
|
|
+ } else if (this.goodsForm.pricingUnit == '件数') {
|
|
|
this.goodsForm.freightCollect = 0
|
|
|
- this.tableDataTwo.forEach(item=>{
|
|
|
- if (item.quantity){
|
|
|
+ this.tableDataTwo.forEach(item => {
|
|
|
+ if (item.quantity) {
|
|
|
this.goodsForm.freightCollect += Number(item.quantity) * Number(this.goodsForm.unitPrice)
|
|
|
}
|
|
|
})
|
|
@@ -2688,13 +2700,13 @@ export default {
|
|
|
},
|
|
|
rowCell(row, index) {
|
|
|
this.$refs.collection.rowCell(row, index)
|
|
|
- if (row.$cellEdit == false){
|
|
|
+ if (row.$cellEdit == false) {
|
|
|
this.editCustomer()
|
|
|
}
|
|
|
},
|
|
|
paymentRowCell(row, index) {
|
|
|
this.$refs.payment.rowCell(row, index)
|
|
|
- if (row.$cellEdit == false){
|
|
|
+ if (row.$cellEdit == false) {
|
|
|
this.editCustomer()
|
|
|
}
|
|
|
},
|
|
@@ -2737,22 +2749,22 @@ export default {
|
|
|
confirmChange() {
|
|
|
// validChange({id:this.id}).then(res => {
|
|
|
// if (res.data.data){
|
|
|
- if (this.goodsForm.status === 5){
|
|
|
+ if (this.goodsForm.status === 5) {
|
|
|
this.goodsOptionFormC.disabled = false
|
|
|
this.goodsOptionForm.disabled = false
|
|
|
this.goodsOptionFormTwo.disabled = true
|
|
|
this.typeTwo = true
|
|
|
this.goodsForm.status = 0
|
|
|
- if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)){
|
|
|
+ if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)) {
|
|
|
this.goodsOptionFormTwo.disabled = true
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.goodsOptionFormC.disabled = false
|
|
|
this.goodsOptionForm.disabled = false
|
|
|
// this.goodsOptionFormTwo.disabled = false
|
|
|
this.typeTwo = true
|
|
|
this.goodsForm.status = 0
|
|
|
- if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)){
|
|
|
+ if (this.roleName.indexOf('admin') !== -1 || (this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)) {
|
|
|
this.goodsOptionFormTwo.disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
@@ -2767,8 +2779,8 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
- confirmChangeTwo(){
|
|
|
- if (((this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1)||this.roleName.indexOf('车队') !== -1)||this.roleName.indexOf('admin') !== -1 && this.goodsForm.status >3){
|
|
|
+ confirmChangeTwo() {
|
|
|
+ if (((this.roleName.indexOf('平台') !== -1 && this.roleName.indexOf('分管调度') !== -1) || this.roleName.indexOf('车队') !== -1) || this.roleName.indexOf('admin') !== -1 && this.goodsForm.status > 3) {
|
|
|
this.goodsOptionFormTwo.disabled = false
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "fleetId").disabled = true
|
|
|
this.findObject(this.goodsOptionFormTwo.column, "plateNo").disabled = false
|
|
@@ -2945,7 +2957,7 @@ export default {
|
|
|
this.$message.success('取消成功');
|
|
|
this.refreshData()
|
|
|
})
|
|
|
- }else if (type == '3'){
|
|
|
+ } else if (type == '3') {
|
|
|
statusBulkLoad({id: this.goodsForm.id, status: 3}).then(res => {
|
|
|
this.$message.success('取消成功');
|
|
|
this.refreshData()
|
|
@@ -3052,8 +3064,8 @@ export default {
|
|
|
//查询业务员
|
|
|
this.salesmanQuery()
|
|
|
},
|
|
|
- getCropId(row){
|
|
|
- if (row){
|
|
|
+ getCropId(row) {
|
|
|
+ if (row) {
|
|
|
this.goodsForm.corpId = row.id
|
|
|
this.goodsForm.corpName = row.cname
|
|
|
this.goodsForm.belongCompany = row.belongCompany
|