Browse Source

feat(order): 将运输方式选择改为弹窗模式

- 将运输方式下拉选择组件替换为可点击输入框
- 添加运输方式选择弹窗组件和相关引用
- 新增当前运输方式选择行状态管理变量
- 实现打开运输方式选择弹窗的方法
- 添加接收运输方式选择数据的处理逻辑
- 支持通过弹窗选择运输方式并更新行数据
master
qiankanghui 4 weeks ago
parent
commit
070969fd29
  1. 46
      src/views/modules/order/poOrder.vue

46
src/views/modules/order/poOrder.vue

@ -97,21 +97,15 @@
</el-input> </el-input>
</template> </template>
<template v-else-if="editMode && item.editAble && item.columnProp==='shipVia'"> <template v-else-if="editMode && item.editAble && item.columnProp==='shipVia'">
<el-select
v-model="rowShipVia[scope.row.id]"
<el-input
v-model="scope.row.shipVia"
size="mini" size="mini"
style="width: 100%"
clearable
filterable
style="width: 100%; cursor: pointer"
readonly
placeholder="请选择运输方式" placeholder="请选择运输方式"
@change="(val) => handlePortChange(scope.row, val)">
<el-option
v-for="opt in transportOptions"
:key="String(opt.value)"
:label="opt.label"
:value="opt.value">
</el-option>
</el-select>
@click.native="openShipViaSelect(scope.row)">
<i slot="suffix" class="el-icon-search" style="cursor: pointer"></i>
</el-input>
</template> </template>
<template v-else-if="editMode && item.editAble"> <template v-else-if="editMode && item.editAble">
<!-- 下拉框 --> <!-- 下拉框 -->
@ -243,6 +237,9 @@
<!-- 目的港选择弹窗 --> <!-- 目的港选择弹窗 -->
<Chooselist ref="destinationList" @getBaseData="getDestinationData"></Chooselist> <Chooselist ref="destinationList" @getBaseData="getDestinationData"></Chooselist>
<!-- 运输方式选择弹窗 -->
<Chooselist ref="shipViaList" @getBaseData="getShipViaData"></Chooselist>
</div> </div>
</template> </template>
@ -275,6 +272,7 @@ export default {
currentPartNoRow: null, // currentPartNoRow: null, //
currentDepartureRow: null, // currentDepartureRow: null, //
currentDestinationRow: null, // currentDestinationRow: null, //
currentShipViaRow: null, //
rowSupplierNo: {}, // rowSupplierNo: {}, //
poPartNoOptions: [], poPartNoOptions: [],
supplierOptions: [], supplierOptions: [],
@ -1653,6 +1651,12 @@ export default {
this.$refs.destinationList.init(2018, '', '') this.$refs.destinationList.init(2018, '', '')
}, },
//
openShipViaSelect(row) {
this.currentShipViaRow = row
this.$refs.shipViaList.init(2019, '', '')
},
// //
getSupplierData(data) { getSupplierData(data) {
console.log('选择的供应商数据:', data) console.log('选择的供应商数据:', data)
@ -1722,6 +1726,22 @@ export default {
// //
this.currentDestinationRow = null this.currentDestinationRow = null
} }
},
//
getShipViaData(data) {
console.log('选择的运输方式数据:', data)
if (data && this.currentShipViaRow) {
//
// SQL: select method_no, method_desc from ship_method
this.$set(this.currentShipViaRow, 'shipVia', data.method_no || data.methodNo || data.shipVia || '')
this.$set(this.currentShipViaRow, 'changeFlag', 1)
console.log('更新后的行数据:', this.currentShipViaRow)
//
this.currentShipViaRow = null
}
} }
} }

Loading…
Cancel
Save