Commit f8e9d6fc authored by huhaiqing's avatar huhaiqing

提货异常

parent 60227cad
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
v-hasPermi="['ecw:warehouse:routerQuery']">{{scope.row.lineId ? '关闭线路' : '开通线路'}}</el-button> v-hasPermi="['ecw:warehouse:routerQuery']">{{scope.row.lineId ? '关闭线路' : '开通线路'}}</el-button>
<el-button size="mini" type="primary" @click="templateClick(scope.row)" v-if="scope.row.lineId != null" <el-button size="mini" type="primary" @click="templateClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">设置路线提单模板</el-button> v-hasPermi="['ecw:warehouse:routerQuery']">设置路线提单模板</el-button>
<el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null" <el-button size="mini" type="primary" @click="serviceClick(scope.row)" v-if="scope.row.lineId != null"
v-hasPermi="['ecw:warehouse:routerQuery']">开通服务</el-button> v-hasPermi="['ecw:warehouse:routerQuery']">开通服务</el-button>
</template> </template>
...@@ -286,9 +286,9 @@ ...@@ -286,9 +286,9 @@
</el-form-item> </el-form-item>
<el-form-item label="目的港服务"> <el-form-item label="目的港服务">
<el-checkbox-group v-model="lineform.otherService"> <el-checkbox-group v-model="lineform.otherService">
<el-checkbox v-for="item in endServiceGroup" :label="item.id" :key="item.id" :value="item.id"> {{item.text}}</el-checkbox> <el-checkbox v-for="item in endServiceGroup" :label="item.id" :key="item.id" :value="item.id" v-show="isShowError(item)"> {{item.text}}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -436,12 +436,13 @@ export default { ...@@ -436,12 +436,13 @@ export default {
serviceGroup: [ serviceGroup: [
{id: '1', text: '集运服务'}, {id: '1', text: '集运服务'},
{id: '2', text: '送货上门'}
], ],
endServiceGroup: [ endServiceGroup: [
{id: '3', text: '非控货订单代收货款'}, {id: '3', text: '非控货订单代收货款'},
{id: '4', text: '海外仓'} {id: '4', text: '海外仓'},
{id: '2', text: '送货上门'},
{id: '5', text: '提货异常'}
], ],
// 总条数 // 总条数
...@@ -454,7 +455,7 @@ export default { ...@@ -454,7 +455,7 @@ export default {
open: false, open: false,
templateOpen:false, templateOpen:false,
dateRangeCreateTime: [], dateRangeCreateTime: [],
serviceOpen: false, serviceOpen: false,
isUpdate: false, isUpdate: false,
...@@ -531,6 +532,14 @@ export default { ...@@ -531,6 +532,14 @@ export default {
}, },
computed: { computed: {
isShowError() {
return (item) => {
if(item.id !== '5') return true;
const { otherService } = this.lineform;
if(otherService.includes('2')) return true;
return false;
}
},
transportName() { transportName() {
return transportType => { return transportType => {
for(let index in this.transportDatas) { for(let index in this.transportDatas) {
...@@ -571,14 +580,14 @@ export default { ...@@ -571,14 +580,14 @@ export default {
if(!otherService) return ''; if(!otherService) return '';
let serviceList = Array.isArray(otherService) ? otherService : otherService.split(","); let serviceList = Array.isArray(otherService) ? otherService : otherService.split(",");
let names = []; let names = [];
const serviceGroup = this.serviceGroup.concat(this.endServiceGroup)
for(let index in serviceList) { for(let index in serviceList) {
let item = serviceList[index]; let item = serviceList[index];
for(let dictIndex in this.serviceGroup) { for(let dictIndex in serviceGroup) {
let dictItem = this.serviceGroup[dictIndex]; let dictItem = serviceGroup[dictIndex];
if(dictItem.id == item) { if(dictItem.id == item) {
names.push(dictItem.text); names.push(dictItem.text);
break; }
}
} }
} }
return names.join(','); return names.join(',');
...@@ -783,11 +792,15 @@ export default { ...@@ -783,11 +792,15 @@ export default {
} }
this.serviceOpen = true; this.serviceOpen = true;
this.lineform.lineId = row.lineId; this.lineform.lineId = row.lineId;
}, },
submitLineForm() { submitLineForm() {
let otherService = this.lineform.otherService; let otherService = this.lineform.otherService;
serviceConfig({ // 如果不存在送货上门,则过滤提货异常
if(!otherService.includes('2')){
otherService = otherService.filter((id) => id !== '5')
}
serviceConfig({
lineId: this.lineform.lineId, lineId: this.lineform.lineId,
otherService: otherService.join(',') otherService: otherService.join(',')
}).then(res => { }).then(res => {
...@@ -1173,5 +1186,6 @@ export default { ...@@ -1173,5 +1186,6 @@ export default {
} }
} }
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment