|
|
|
@ -97,21 +97,15 @@ |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
<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" |
|
|
|
style="width: 100%" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
style="width: 100%; cursor: pointer" |
|
|
|
readonly |
|
|
|
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 v-else-if="editMode && item.editAble"> |
|
|
|
<!-- 下拉框 --> |
|
|
|
@ -243,6 +237,9 @@ |
|
|
|
|
|
|
|
<!-- 目的港选择弹窗 --> |
|
|
|
<Chooselist ref="destinationList" @getBaseData="getDestinationData"></Chooselist> |
|
|
|
|
|
|
|
<!-- 运输方式选择弹窗 --> |
|
|
|
<Chooselist ref="shipViaList" @getBaseData="getShipViaData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -275,6 +272,7 @@ export default { |
|
|
|
currentPartNoRow: null, // 当前正在选择物料的行 |
|
|
|
currentDepartureRow: null, // 当前正在选择始发港的行 |
|
|
|
currentDestinationRow: null, // 当前正在选择目的港的行 |
|
|
|
currentShipViaRow: null, // 当前正在选择运输方式的行 |
|
|
|
rowSupplierNo: {}, //存储每行选中的供应商编号 |
|
|
|
poPartNoOptions: [], |
|
|
|
supplierOptions: [], |
|
|
|
@ -1653,6 +1651,12 @@ export default { |
|
|
|
this.$refs.destinationList.init(2018, '', '') |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开运输方式选择弹窗 |
|
|
|
openShipViaSelect(row) { |
|
|
|
this.currentShipViaRow = row |
|
|
|
this.$refs.shipViaList.init(2019, '', '') |
|
|
|
}, |
|
|
|
|
|
|
|
// 接收供应商选择数据 |
|
|
|
getSupplierData(data) { |
|
|
|
console.log('选择的供应商数据:', data) |
|
|
|
@ -1722,6 +1726,22 @@ export default { |
|
|
|
// 清空当前选择行 |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|