|
@@ -15,7 +15,12 @@
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-form-item label="选择仓库" prop="warehouse">
|
|
<el-form-item label="选择仓库" prop="warehouse">
|
|
- <el-select v-model="mainForm.warehouse" placeholder="请选择仓库" style="width: 100%" :disabled="!!listItem">
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="mainForm.warehouse"
|
|
|
|
+ placeholder="请选择仓库"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :disabled="!!listItem"
|
|
|
|
+ >
|
|
<el-option
|
|
<el-option
|
|
:label="item.name"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
@@ -57,12 +62,11 @@
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
<el-form-item label="提货方式" prop="pickupWay">
|
|
<el-form-item label="提货方式" prop="pickupWay">
|
|
<el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
|
|
<el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
|
|
- <!-- ||(isFront===false && item.dictCode=='2' ) -->
|
|
|
|
<el-radio
|
|
<el-radio
|
|
:label="item.dictCode"
|
|
:label="item.dictCode"
|
|
- :disabled="isFront === true && item.dictCode == '1'"
|
|
|
|
v-for="(item, index) in pickupWayList"
|
|
v-for="(item, index) in pickupWayList"
|
|
:key="index"
|
|
:key="index"
|
|
|
|
+ :disabled="item.disabled"
|
|
>{{ item.dictValue }}
|
|
>{{ item.dictValue }}
|
|
</el-radio>
|
|
</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -92,26 +96,51 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :xs="24" :sm="12" :lg="8" v-if="mainForm.pickupWay == '2'">
|
|
|
|
- <el-form-item label="物流公司" prop="company">
|
|
|
|
- <el-select
|
|
|
|
- v-model="mainForm.logisticsId"
|
|
|
|
- @change="getLogisticsId"
|
|
|
|
- placeholder="全部"
|
|
|
|
- style="width: 100%"
|
|
|
|
- :disabled="flag"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- :label="item.logisticsCompany"
|
|
|
|
- :value="item.id"
|
|
|
|
- :disabled="comDisabled(item.id)"
|
|
|
|
- v-for="(item, index) in companyList"
|
|
|
|
- :key="index"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <template v-if="mainForm.pickupWay == '2'">
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8">
|
|
|
|
+ <el-form-item label="物流公司" prop="company">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="mainForm.logisticsId"
|
|
|
|
+ @change="getLogisticsId"
|
|
|
|
+ placeholder="全部"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :disabled="flag"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.logisticsCompany"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ v-for="(item, index) in companyList"
|
|
|
|
+ :key="index"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col class="pd-lr" :span="16">
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="是否上楼" prop="isUp">
|
|
|
|
+ <el-radio-group v-model="mainForm.isUp" :disabled="flag">
|
|
|
|
+ <el-radio label="YES"> 是 </el-radio>
|
|
|
|
+ <el-radio label="NO"> 否 </el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="是否卸货" prop="isDischarge">
|
|
|
|
+ <el-radio-group v-model="mainForm.isDischarge" :disabled="flag">
|
|
|
|
+ <el-radio label="YES"> 是 </el-radio>
|
|
|
|
+ <el-radio label="NO"> 否 </el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </template>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8">
|
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
|
+ <el-input v-model="mainForm.remark" placeholder="请输入备注" :disabled="flag"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+
|
|
<!-- <el-row :gutter="20">-->
|
|
<!-- <el-row :gutter="20">-->
|
|
<!-- <template v-if="logisticsNumber === '001'">-->
|
|
<!-- <template v-if="logisticsNumber === '001'">-->
|
|
<!-- <el-col :xs="24" :sm="8" :lg="8">-->
|
|
<!-- <el-col :xs="24" :sm="8" :lg="8">-->
|
|
@@ -332,7 +361,7 @@
|
|
min-width="100"
|
|
min-width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column fixed="right" label="操作" width="100" v-if="flag && mainForm.pickupWay=='2'">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="100" v-if="flag && mainForm.pickupWay == '2'">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button @click="handLogistics(scope.row)" type="text" size="small">物流信息</el-button>
|
|
<el-button @click="handLogistics(scope.row)" type="text" size="small">物流信息</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -340,7 +369,6 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div class="page-footer">
|
|
<div class="page-footer">
|
|
<div class="footer" :class="classObj">
|
|
<div class="footer" :class="classObj">
|
|
<el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading"
|
|
<el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading"
|
|
@@ -412,7 +440,9 @@ export default {
|
|
logisticsId: '',
|
|
logisticsId: '',
|
|
receivingName: '',
|
|
receivingName: '',
|
|
phone: '',
|
|
phone: '',
|
|
- address: ''
|
|
|
|
|
|
+ address: '',
|
|
|
|
+ isUp: 'NO',
|
|
|
|
+ isDischarge: 'NO'
|
|
},
|
|
},
|
|
mainFormRules: {
|
|
mainFormRules: {
|
|
date: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
|
|
date: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
|
|
@@ -432,12 +462,11 @@ export default {
|
|
pickupCarList: [],
|
|
pickupCarList: [],
|
|
companyList: [],
|
|
companyList: [],
|
|
logisticsNumber: '',
|
|
logisticsNumber: '',
|
|
- isFront: null,
|
|
|
|
storeList: [
|
|
storeList: [
|
|
- {
|
|
|
|
- label: '前置仓',
|
|
|
|
- value: 0
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // label: '前置仓',
|
|
|
|
+ // value: 0
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
label: '工程机',
|
|
label: '工程机',
|
|
value: 1
|
|
value: 1
|
|
@@ -454,7 +483,11 @@ export default {
|
|
},
|
|
},
|
|
visible: false,
|
|
visible: false,
|
|
orderId: '',
|
|
orderId: '',
|
|
- logisticsDetail: []
|
|
|
|
|
|
+ logisticsDetail: [],
|
|
|
|
+ frontPickType: null,
|
|
|
|
+ isFront: null,
|
|
|
|
+ isPick: null,
|
|
|
|
+ isPickUpGoods: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -467,23 +500,21 @@ export default {
|
|
hideSidebar: !this.sidebar.opened,
|
|
hideSidebar: !this.sidebar.opened,
|
|
openSidebar: this.sidebar.opened
|
|
openSidebar: this.sidebar.opened
|
|
}
|
|
}
|
|
- },
|
|
|
|
- comDisabled() {
|
|
|
|
- return id => {
|
|
|
|
- if (this.isFront === false && id === '1574563841707114498') {
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
- if (this.isFront === true && id !== '1574563841707114498') {
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
+ // comDisabled() {
|
|
|
|
+ // return id => {
|
|
|
|
+ // if (this.isFront === false && id === '1574563841707114498') {
|
|
|
|
+ // return true
|
|
|
|
+ // }
|
|
|
|
+ // if (this.isFront === true && id !== '1574563841707114498') {
|
|
|
|
+ // return true
|
|
|
|
+ // }
|
|
|
|
+ // return false
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
- this.isFront = JSON.parse(localStorage.getItem('supply_user')).isFront
|
|
|
|
-
|
|
|
|
this.getWarehouseList()
|
|
this.getWarehouseList()
|
|
this.getPickupWayList()
|
|
this.getPickupWayList()
|
|
this.getPickupManList()
|
|
this.getPickupManList()
|
|
@@ -578,6 +609,8 @@ export default {
|
|
this.mainForm.company = data.pickLogistics
|
|
this.mainForm.company = data.pickLogistics
|
|
this.mainForm.remark = data.remark
|
|
this.mainForm.remark = data.remark
|
|
this.mainForm.logisticsId = data.logisticsId
|
|
this.mainForm.logisticsId = data.logisticsId
|
|
|
|
+ this.mainForm.isUp = data.isUp
|
|
|
|
+ this.mainForm.isDischarge = data.isDischarge
|
|
if (this.mainForm.pickupWay == 2) {
|
|
if (this.mainForm.pickupWay == 2) {
|
|
const item = this.companyList.find(k => k.id === data.logisticsId)
|
|
const item = this.companyList.find(k => k.id === data.logisticsId)
|
|
this.logisticsNumber = item.logisticsNumber
|
|
this.logisticsNumber = item.logisticsNumber
|
|
@@ -622,31 +655,46 @@ export default {
|
|
// 获取提货方式列表
|
|
// 获取提货方式列表
|
|
getPickupWayList() {
|
|
getPickupWayList() {
|
|
getDictList({ sysDictEnum: 'PICK' }).then(res => {
|
|
getDictList({ sysDictEnum: 'PICK' }).then(res => {
|
|
- this.pickupWayList = res.data
|
|
|
|
- if (this.isFront === true) {
|
|
|
|
- this.mainForm.pickupWay = '2'
|
|
|
|
- this.mainForm.logisticsId = '1574563841707114498'
|
|
|
|
- getCompanyList({
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: -1
|
|
|
|
- }).then(res => {
|
|
|
|
- this.companyList = res.data.records
|
|
|
|
- const item = this.companyList.find(k => k.id === this.mainForm.logisticsId)
|
|
|
|
- this.mainForm.company = item.logisticsCompany
|
|
|
|
- this.logisticsNumber = item.logisticsNumber
|
|
|
|
- if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
|
|
|
|
- if (!this.listItem) {
|
|
|
|
- this.deliverList.forEach(k => {
|
|
|
|
- this.$set(k, 'receivingName', '')
|
|
|
|
- this.$set(k, 'phone', '')
|
|
|
|
- this.$set(k, 'address', '')
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ const localData = JSON.parse(localStorage.getItem('supply_user'))
|
|
|
|
+ this.frontPickType = localData.frontPickType
|
|
|
|
+ this.isFront = localData.isFront
|
|
|
|
+ this.isPick = localData.isPick
|
|
|
|
+ res.data.forEach(k => {
|
|
|
|
+ if (this.frontPickType) {
|
|
|
|
+ if (!this.isFront && k.dictCode == 1) {
|
|
|
|
+ k.disabled = true
|
|
}
|
|
}
|
|
- })
|
|
|
|
- } else if (this.isFront === false) {
|
|
|
|
- this.mainForm.pickupWay = '1'
|
|
|
|
- }
|
|
|
|
|
|
+ if (!this.isPick && k.dictCode == 2) {
|
|
|
|
+ k.disabled = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.pickupWayList = res.data
|
|
|
|
+
|
|
|
|
+ // if (this.isFront === true) {
|
|
|
|
+ // this.mainForm.pickupWay = '2'
|
|
|
|
+ // this.mainForm.logisticsId = '1574563841707114498'
|
|
|
|
+ // getCompanyList({
|
|
|
|
+ // pageNum: 1,
|
|
|
|
+ // pageSize: -1
|
|
|
|
+ // }).then(res => {
|
|
|
|
+ // this.companyList = res.data.records
|
|
|
|
+ // const item = this.companyList.find(k => k.id === this.mainForm.logisticsId)
|
|
|
|
+ // this.mainForm.company = item.logisticsCompany
|
|
|
|
+ // this.logisticsNumber = item.logisticsNumber
|
|
|
|
+ // if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
|
|
|
|
+ // if (!this.listItem) {
|
|
|
|
+ // this.deliverList.forEach(k => {
|
|
|
|
+ // this.$set(k, 'receivingName', '')
|
|
|
|
+ // this.$set(k, 'phone', '')
|
|
|
|
+ // this.$set(k, 'address', '')
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // } else if (this.isFront === false) {
|
|
|
|
+ // this.mainForm.pickupWay = '1'
|
|
|
|
+ // }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -860,7 +908,6 @@ export default {
|
|
pickType: Number(this.mainForm.pickupWay),
|
|
pickType: Number(this.mainForm.pickupWay),
|
|
takerId: this.mainForm.pickupMan,
|
|
takerId: this.mainForm.pickupMan,
|
|
takerName: takerName || '',
|
|
takerName: takerName || '',
|
|
-
|
|
|
|
remark: this.mainForm.remark,
|
|
remark: this.mainForm.remark,
|
|
invoiceOrderIds: orderList
|
|
invoiceOrderIds: orderList
|
|
}
|
|
}
|
|
@@ -870,6 +917,8 @@ export default {
|
|
if (this.mainForm.pickupWay == '2') {
|
|
if (this.mainForm.pickupWay == '2') {
|
|
params.pickLogistics = this.mainForm.company
|
|
params.pickLogistics = this.mainForm.company
|
|
params.logisticsId = this.mainForm.logisticsId
|
|
params.logisticsId = this.mainForm.logisticsId
|
|
|
|
+ params.isUp = this.mainForm.isUp
|
|
|
|
+ params.isDischarge = this.mainForm.isDischarge
|
|
// params.receivingName = this.mainForm.receivingName
|
|
// params.receivingName = this.mainForm.receivingName
|
|
// params.phone = this.mainForm.phone
|
|
// params.phone = this.mainForm.phone
|
|
// params.address = this.mainForm.address
|
|
// params.address = this.mainForm.address
|
|
@@ -900,12 +949,12 @@ export default {
|
|
|
|
|
|
resetForm() {
|
|
resetForm() {
|
|
this.$refs.mainForm.resetFields()
|
|
this.$refs.mainForm.resetFields()
|
|
- if (this.isFront === true) {
|
|
|
|
- this.mainForm.pickupWay = '2'
|
|
|
|
- }
|
|
|
|
- if (this.isFront === false) {
|
|
|
|
- this.mainForm.pickupWay = '1'
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.isFront === true) {
|
|
|
|
+ // this.mainForm.pickupWay = '2'
|
|
|
|
+ // }
|
|
|
|
+ // if (this.isFront === false) {
|
|
|
|
+ // this.mainForm.pickupWay = '1'
|
|
|
|
+ // }
|
|
this.deliverList = []
|
|
this.deliverList = []
|
|
},
|
|
},
|
|
handLogistics(row) {
|
|
handLogistics(row) {
|
|
@@ -925,12 +974,28 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-.logistics-title{
|
|
|
|
- padding-bottom: 10px;
|
|
|
|
|
|
+.flex {
|
|
|
|
+ display: flex;
|
|
|
|
+ div {
|
|
|
|
+ flex: 1;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+::v-deep .el-timeline-item__tail {
|
|
|
|
+ border-left: 2px solid #67c23a;
|
|
|
|
+}
|
|
|
|
+::v-deep .el-form-item__content {
|
|
|
|
+ line-height: 33px;
|
|
|
|
+}
|
|
|
|
+.logistics-title {
|
|
|
|
+ padding: 10px;
|
|
}
|
|
}
|
|
.tip {
|
|
.tip {
|
|
height: 200px;
|
|
height: 200px;
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 200px;
|
|
line-height: 200px;
|
|
}
|
|
}
|
|
|
|
+.pd-lr {
|
|
|
|
+ padding-left: 0 !important;
|
|
|
|
+ padding-right: 0 !important;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|