|
@@ -4,24 +4,14 @@
|
|
|
<el-divider></el-divider>
|
|
|
|
|
|
<div>
|
|
|
- <el-form
|
|
|
- ref="mainForm"
|
|
|
- :model="mainForm"
|
|
|
- :rules="mainFormRules"
|
|
|
- label-width="80px"
|
|
|
- size="small"
|
|
|
- label-position="left"
|
|
|
- >
|
|
|
+ <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="80px" size="small"
|
|
|
+ label-position="left">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="选择仓库" prop="warehouse">
|
|
|
<el-select v-model="mainForm.warehouse" placeholder="请选择仓库" style="width: 100%" :disabled="listItem">
|
|
|
- <el-option
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in warehouseList"
|
|
|
- :key="index"
|
|
|
- ></el-option>
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList"
|
|
|
+ :key="index"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -32,14 +22,8 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
|
|
|
<el-form-item label="预约日期" prop="date">
|
|
|
- <el-date-picker
|
|
|
- :disabled="flag"
|
|
|
- v-model="mainForm.date"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="选择日期"
|
|
|
- >
|
|
|
+ <el-date-picker :disabled="flag" v-model="mainForm.date" type="date" value-format="yyyy-MM-dd"
|
|
|
+ style="width: 100%" placeholder="选择日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -57,8 +41,9 @@
|
|
|
<el-form-item label="提货方式" prop="pickupWay">
|
|
|
<el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
|
|
|
<!-- ||(isFront===false && item.dictCode=='2' ) -->
|
|
|
- <el-radio :label="item.dictCode" :disabled="(isFront ===true && item.dictCode=='1' ) " v-for="(item, index) in pickupWayList" :key="index">{{
|
|
|
- item.dictValue
|
|
|
+ <el-radio :label="item.dictCode" :disabled="(isFront === true && item.dictCode == '1')"
|
|
|
+ v-for="(item, index) in pickupWayList" :key="index">{{
|
|
|
+ item.dictValue
|
|
|
}}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -67,43 +52,25 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="8">
|
|
|
<el-form-item label="提货人" prop="pickupMan" v-if="mainForm.pickupWay == '1'">
|
|
|
<el-select v-model="mainForm.pickupMan" placeholder="全部" :disabled="flag" style="width: 100%">
|
|
|
- <el-option
|
|
|
- :label="item.takerName"
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in pickupManList"
|
|
|
- :key="index"
|
|
|
- ></el-option>
|
|
|
+ <el-option :label="item.takerName" :value="item.id" v-for="(item, index) in pickupManList"
|
|
|
+ :key="index"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="8" v-if="mainForm.pickupWay == '1'">
|
|
|
<el-form-item label="提货车辆" prop="pickupCar">
|
|
|
<el-select v-model="mainForm.pickupCar" placeholder="全部" style="width: 100%" :disabled="flag">
|
|
|
- <el-option
|
|
|
- :label="item.carBrand"
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in pickupCarList"
|
|
|
- :key="index"
|
|
|
- ></el-option>
|
|
|
+ <el-option :label="item.carBrand" :value="item.id" v-for="(item, index) in pickupCarList"
|
|
|
+ :key="index"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</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 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>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -137,67 +104,61 @@
|
|
|
|
|
|
<div class="mymain-container">
|
|
|
<div class="table">
|
|
|
- <el-table
|
|
|
- ref="table"
|
|
|
- v-loading="listLoading"
|
|
|
- :data="deliverList"
|
|
|
- element-loading-text="Loading"
|
|
|
- border
|
|
|
- fit
|
|
|
- highlight-current-row
|
|
|
- stripe
|
|
|
- @select="handleSelect"
|
|
|
- @select-all="handleSelectAll"
|
|
|
- >
|
|
|
+ <el-table ref="table" v-loading="listLoading" :data="deliverList" element-loading-text="Loading" border fit
|
|
|
+ highlight-current-row stripe @select="handleSelect" @select-all="handleSelectAll">
|
|
|
<el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
+
|
|
|
<template v-if="logisticsNumber === '001' && mainForm.pickupWay == 2">
|
|
|
+ <el-table-column align="left" label="仓库" prop="invoiceId" min-width="160" show-overflow-tooltip v-if="isFront!==null">
|
|
|
+ <template v-slot="{row}">
|
|
|
+ <el-select v-model="row.warehouseFlag" value-key="" placeholder="" clearable filterable size="mini" @change="">
|
|
|
+ <el-option v-for="item in storeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="left" label="收货客户" prop="orderTime" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
- :disabled="flag"
|
|
|
- v-model="scope.row.receivingName"
|
|
|
- size="mini"
|
|
|
- @input="handleInput($event, scope.row.invoiceId, 1)"
|
|
|
- ></el-input>
|
|
|
- <template v-else> {{ scope.row.refLinkman }}</template>
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag"
|
|
|
+ v-model="scope.row.receivingName" size="mini"
|
|
|
+ @input="handleInput($event, scope.row.invoiceId, 1)"></el-input>
|
|
|
+ <template v-else>
|
|
|
+ <el-input :disabled="flag ||(isFront!==null && (scope.row.warehouseFlag==0 || scope.row.warehouseFlag == null))"
|
|
|
+ v-model="scope.row.refLinkman " size="mini"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="电话" prop="orderTime" min-width="150" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
- :disabled="flag"
|
|
|
- v-model="scope.row.phone"
|
|
|
- size="mini"
|
|
|
- @input="handleInput($event, scope.row.invoiceId, 2)"
|
|
|
- ></el-input>
|
|
|
- <template v-else>{{ scope.row.refPhone }}</template>
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag"
|
|
|
+ v-model="scope.row.phone" size="mini" @input="handleInput($event, scope.row.invoiceId, 2)"></el-input>
|
|
|
+ <template v-else>
|
|
|
+ <el-input :disabled="flag ||(isFront!==null && (scope.row.warehouseFlag==0 || scope.row.warehouseFlag == null))"
|
|
|
+ v-model="scope.row.refPhone " size="mini"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="收货地址" prop="orderTime" min-width="200" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
- :disabled="flag"
|
|
|
- v-model="scope.row.address"
|
|
|
- size="mini"
|
|
|
- @input="handleInput($event, scope.row.invoiceId, 3)"
|
|
|
- ></el-input>
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag"
|
|
|
+ v-model="scope.row.address" size="mini"
|
|
|
+ @input="handleInput($event, scope.row.invoiceId, 3)"></el-input>
|
|
|
<template v-else>
|
|
|
- {{ scope.row.refInstallAddress }}
|
|
|
+ <el-input :disabled="flag || (isFront!==null && (scope.row.warehouseFlag==0 || scope.row.warehouseFlag == null))"
|
|
|
+ v-model="scope.row.refInstallAddress " size="mini"
|
|
|
+ ></el-input>
|
|
|
</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="发货申请单"
|
|
|
- prop="invoiceId"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column align="left" label="发货申请单" prop="invoiceId" min-width="160"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="left" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.orderTime | dateToDayFilter }}
|
|
@@ -205,69 +166,36 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="销售订单号" prop="mainOrderId" min-width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <CopyButton
|
|
|
- :copyText="
|
|
|
- scope.row.orderType === 'TRADE' ||
|
|
|
+ <CopyButton :copyText="
|
|
|
+ scope.row.orderType === 'TRADE' ||
|
|
|
scope.row.orderType === 'HOME' ||
|
|
|
scope.row.orderType === 'REQUISITION_TRADE' ||
|
|
|
scope.row.orderType === 'REQUISITION_HOME'
|
|
|
- ? scope.row.enginOrderNo
|
|
|
- : scope.row.mainOrderId
|
|
|
- "
|
|
|
- />
|
|
|
+ ? scope.row.enginOrderNo
|
|
|
+ : scope.row.mainOrderId
|
|
|
+ " />
|
|
|
<span>{{
|
|
|
scope.row.orderType === 'TRADE' ||
|
|
|
- scope.row.orderType === 'HOME' ||
|
|
|
- scope.row.orderType === 'REQUISITION_TRADE' ||
|
|
|
- scope.row.orderType === 'REQUISITION_HOME'
|
|
|
+ scope.row.orderType === 'HOME' ||
|
|
|
+ scope.row.orderType === 'REQUISITION_TRADE' ||
|
|
|
+ scope.row.orderType === 'REQUISITION_HOME'
|
|
|
? scope.row.enginOrderNo
|
|
|
: scope.row.mainOrderId
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column align="left" label="工程编号" prop="enginOrderNo" min-width="140" show-overflow-tooltip></el-table-column> -->
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="销售类型"
|
|
|
- prop="saleTypeName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="物料编码"
|
|
|
- prop="materialCode"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="产品名称"
|
|
|
- prop="materialName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="规格型号"
|
|
|
- prop="specification"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="单位"
|
|
|
- prop="unit"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="数量"
|
|
|
- prop="refundableQty"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
+ <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="160"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="left" label="物料编码" prop="materialCode" min-width="160"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="left" label="产品名称" prop="materialName" min-width="160"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="left" label="规格型号" prop="specification" min-width="160"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="right" label="数量" prop="refundableQty" min-width="100"
|
|
|
+ show-overflow-tooltip></el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -276,7 +204,7 @@
|
|
|
<div class="footer" :class="classObj">
|
|
|
<el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading">{{
|
|
|
formLoading ? '提交中 ...' : '提 交'
|
|
|
- }}
|
|
|
+ }}
|
|
|
</el-button>
|
|
|
<el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px" v-if="!listItem">
|
|
|
<el-button slot="reference">重 置</el-button>
|
|
@@ -340,7 +268,22 @@ export default {
|
|
|
pickupCarList: [],
|
|
|
companyList: [],
|
|
|
logisticsNumber: '',
|
|
|
- isFront: null
|
|
|
+ isFront: null,
|
|
|
+ storeList:[
|
|
|
+ {
|
|
|
+ label:'前置仓',
|
|
|
+ value:'0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'工程机',
|
|
|
+ value:'1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'商家仓',
|
|
|
+ value:'2'
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -354,12 +297,12 @@ export default {
|
|
|
openSidebar: this.sidebar.opened
|
|
|
}
|
|
|
},
|
|
|
- comDisabled(){
|
|
|
- return (id)=>{
|
|
|
- if (this.isFront ===false && id === '1574563841707114498') {
|
|
|
- return true
|
|
|
+ comDisabled() {
|
|
|
+ return (id) => {
|
|
|
+ if (this.isFront === false && id === '1574563841707114498') {
|
|
|
+ return true
|
|
|
}
|
|
|
- if (this.isFront ===true && id !== '1574563841707114498') {
|
|
|
+ if (this.isFront === true && id !== '1574563841707114498') {
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
@@ -449,7 +392,7 @@ export default {
|
|
|
getPickupWayList() {
|
|
|
getDictList({ sysDictEnum: 'PICK' }).then(res => {
|
|
|
this.pickupWayList = res.data
|
|
|
- if (this.isFront===true) {
|
|
|
+ if (this.isFront === true) {
|
|
|
this.mainForm.pickupWay = '2'
|
|
|
this.mainForm.logisticsId = '1574563841707114498'
|
|
|
getCompanyList({
|
|
@@ -463,14 +406,14 @@ export default {
|
|
|
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', '')
|
|
|
- })
|
|
|
+ this.$set(k, 'receivingName', '')
|
|
|
+ this.$set(k, 'phone', '')
|
|
|
+ this.$set(k, 'address', '')
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- }else if (this.isFront===false) {
|
|
|
+ } else if (this.isFront === false) {
|
|
|
this.mainForm.pickupWay = '1'
|
|
|
|
|
|
}
|
|
@@ -562,6 +505,23 @@ export default {
|
|
|
return this.$errorMsg('请选择发货申请单')
|
|
|
}
|
|
|
|
|
|
+ for (let i = 0; i < this.tableSelection.length; i++) {
|
|
|
+ if (this.tableSelection[i].warehouseFlag == 2) {
|
|
|
+ let el = this.tableSelection[i]
|
|
|
+ if (!(el.orderType === 'TRADE' || el.orderType === 'HOME')) {
|
|
|
+ if (!(el.receivingName && el.phone && el.address)) {
|
|
|
+ return this.$errorMsg('商家仓必须填写收货地址、电话、收货地址')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (!(el.refLinkman && el.refPhone && el.refInstallAddress)) {
|
|
|
+ return this.$errorMsg('商家仓必须填写收货地址、电话、收货地址')
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
let orderList = []
|
|
|
this.tableSelection.forEach(item => {
|
|
|
orderList.push(item.invoiceOrderId)
|
|
@@ -672,4 +632,6 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+</style>
|