Commit c39a150c authored by chenwei's avatar chenwei

创建提货点,启用状态提货点,未启用状态提货点逻辑更改


(cherry picked from commit 5836cd18)
parent 5a9f7c3b
...@@ -25,14 +25,15 @@ ...@@ -25,14 +25,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds"> <el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds" :key="item.id">
<el-col :span="6"> <el-col :span="6">
<el-form-item v-if="title == 3" :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses"> <el-form-item v-if="title == 3" :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses">
<el-select v-model="item.wareHouses" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable multiple filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small"> <el-select v-model="item.wareHouses" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable multiple filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small">
<el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" /> <el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-else :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses"> <!-- 编辑对应单个提货点 逻辑显示-->
<el-form-item v-else :label="$t('提货点')" :prop="`nodeId`">
<el-select v-model="queryParams.nodeId" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small"> <el-select v-model="queryParams.nodeId" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small">
<el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" /> <el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
</el-select> </el-select>
...@@ -190,7 +191,7 @@ export default { ...@@ -190,7 +191,7 @@ export default {
endTime: null, endTime: null,
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }], nodeIds: [{ wareHouses: "", points: "", quantityRemain: null, id: 0 }],
nodeId: null, nodeId: null,
pickMethod: null, pickMethod: null,
pointsRequire: null, pointsRequire: null,
...@@ -233,6 +234,13 @@ export default { ...@@ -233,6 +234,13 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
nodeId: [
{
required: true,
message: this.$t("请选择提货点"),
trigger: "change"
}
],
nodeIds: { nodeIds: {
wareHouses: [ wareHouses: [
{ {
...@@ -303,9 +311,7 @@ export default { ...@@ -303,9 +311,7 @@ export default {
this.handleWarehouseList() this.handleWarehouseList()
}, },
methods: { methods: {
dataTimeFunc(e) { dataTimeFunc(e) {},
console.log("5555", e)
},
changeWarehouseList(e) { changeWarehouseList(e) {
if (e) { if (e) {
this.handleWarehouseList() this.handleWarehouseList()
...@@ -319,7 +325,7 @@ export default { ...@@ -319,7 +325,7 @@ export default {
}, },
handleOrderVRule(item, index) { handleOrderVRule(item, index) {
if (index == "0") { if (index == "0") {
this.queryParams.nodeIds.push({ nodeId: "", points: "" }) this.queryParams.nodeIds.push({ wareHouses: null, nodeId: "", points: "", id: index + 1 })
} else { } else {
this.queryParams.nodeIds.splice(index, 1) this.queryParams.nodeIds.splice(index, 1)
} }
...@@ -329,7 +335,9 @@ export default { ...@@ -329,7 +335,9 @@ export default {
params.startTime = this.queryParams?.dateRangeCreateTime?.[0] params.startTime = this.queryParams?.dateRangeCreateTime?.[0]
params.endTime = this.queryParams?.dateRangeCreateTime?.[1] params.endTime = this.queryParams?.dateRangeCreateTime?.[1]
params.pickMethod = this.queryParams.pickMethod.toString() params.pickMethod = this.queryParams.pickMethod.toString()
params.nodeIds[0].wareHouses[0] = params.nodeId if (this.title != 3) {
params.nodeIds[0].wareHouses[0] = params.nodeId
}
this.$refs["queryForm"].validate((valid) => { this.$refs["queryForm"].validate((valid) => {
if (valid) { if (valid) {
if (this.title == "2") { if (this.title == "2") {
...@@ -360,7 +368,7 @@ export default { ...@@ -360,7 +368,7 @@ export default {
this.queryParams = { this.queryParams = {
allowCount: null, allowCount: null,
endTime: null, endTime: null,
nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }], nodeIds: [{ wareHouses: "", points: "", quantityRemain: null, id: 0 }],
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeId: null, nodeId: null,
......
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