From 0f1a234db878973564eef498f071f59de674278c Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Sat, 19 Nov 2022 14:20:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=87=E8=B4=AD=E9=80=80?= =?UTF-8?q?=E5=BA=93=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../caigoutuiku/caigoutuikuAdd.vue | 26 +- .../caigoutuiku/relation/xuanzecheliang.vue | 243 +++++------------- .../caigoutuikuFlow/caigoutuikuEdit.vue | 29 ++- .../relation/xuanzecheliang.vue | 243 +++++------------- 4 files changed, 147 insertions(+), 394 deletions(-) diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue index d6283e4be9..be6c54db4c 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/caigoutuikuAdd.vue @@ -6,7 +6,7 @@
保存 - 提交 + 提交 关闭
@@ -187,16 +187,19 @@ export default { this.viewState = 1 }, selectVehicle(depositVehicleList) { - for (var i = 0; i < depositVehicleList.length; i++) { - this.list.push({ - configName: depositVehicleList[i].configName, - configSid: depositVehicleList[i].configSid, - inboundDate: depositVehicleList[i].priceDate, - modelName: depositVehicleList[i].vehicleAlias, - vinNo: depositVehicleList[i].vinNo, - returnStockCost: '', - costRemarks: '' - }) + this.viewState = 1 + if (depositVehicleList.length > 0) { + for (var i = 0; i < depositVehicleList.length; i++) { + this.list.push({ + configName: depositVehicleList[i].configName, + configSid: depositVehicleList[i].configSid, + inboundDate: depositVehicleList[i].priceDate, + modelName: depositVehicleList[i].vehicleAlias, + vinNo: depositVehicleList[i].vinNo, + returnStockCost: '', + costRemarks: '' + }) + } } console.log('车辆表数据', this.list) }, @@ -204,7 +207,6 @@ export default { dataDelete(index, row) { this.list.splice(index, 1) }, - // 返回(===既判断又赋值) handleReturn(isreload) { if (isreload === 'true') this.$emit('reloadlist') diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/relation/xuanzecheliang.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/relation/xuanzecheliang.vue index b7d7a661fc..22e6a174ab 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/relation/xuanzecheliang.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/caigoutuiku/relation/xuanzecheliang.vue @@ -2,7 +2,7 @@
-
现车库存
+
车辆查询
确定 关闭 @@ -12,50 +12,26 @@
{{ searchxianshitit }}
-
现车库存列表
+
现车列表
@@ -119,6 +95,7 @@ import Pagination from '@/components/pagination' import pageye from '@/components/pagination/pageye' import req from '@/api/supplychain/purchasereturntowarehouse' +import { typeValues, brandDown, fetchByUseOrgSid, getPathSidByUserSid } from '@/api/cheliang/dictcommons' export default { name: 'xuanzecheliang', @@ -128,22 +105,13 @@ export default { }, data() { return { - createPage: '', - dialogVisible: false, // 弹窗 isSearchShow: false, searchxianshitit: '显示查询条件', - btndisabled: false, viewState: 1, // 1、列表 2、添加-车辆预定 3、编辑 4、查看 5、订金-定金收取 // 查询 ----------- carbrand_list: [], // 品牌 - vehicleFunction_list: [], // 功能 - productLine_list: [], // 系列 - gearboxType_list: [], // 变速箱 - driveForm_list: [], // 驱动 - emissionStandard_list: [], // 排放标准 - power_list: [], // 马力 - fuelType_list: [], // 燃料 - vehicleVersion_list: [], // 版本 + carColor_list: [], // 功能 + location_list: [], // 版本 tableKey: 0, list: [], sids: [], @@ -155,30 +123,39 @@ export default { total: 0, params: { brandSid: '', - driveForm: '', - emissionStandard: '', - fuelType: '', - gearboxType: '', - lockedState: '', - power: '', - productLine: '', - vehicleState: '', - vehicleType: '', - vehicleVersion: '', + modelNameAndCode: '', + vinNo: '', + carColorKey: '', + location: '', vinNoList: [], userSid: '' } }, - selectDate: undefined, - temp: {}, // 添加和编辑 - vinNoList: [], - depositVehicleList: [], - visible: true, - hetongdanganguanliInfoShow: false - // ------------------------------------ + vinNoList: [] } }, methods: { + init() { + typeValues({ type: 'bodyColor' }).then((resp) => { + if (resp.success) { + this.carColor_list = resp.data + } + }) + getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { + if (res.success) { + brandDown({ useOrg: res.data }).then((resp) => { + if (resp.success) { + this.carbrand_list = resp.data + } + }) + fetchByUseOrgSid({ sid: res.data }).then((respsone) => { + if (respsone.success) { + this.location_list = respsone.data + } + }) + } + }) + }, // 搜索条件效果 clicksearchShow() { this.isSearchShow = !this.isSearchShow @@ -194,140 +171,38 @@ export default { this.listQuery.total = 0 this.listQuery.size = 5 this.listQuery.params.brandSid = '' - this.listQuery.params.driveForm = '' - this.listQuery.params.emissionStandard = '' - this.listQuery.params.fuelType = '' - this.listQuery.params.gearboxType = '' - this.listQuery.params.lockedState = '' - this.listQuery.params.power = '' - this.listQuery.params.productLine = '' - this.listQuery.params.vehicleState = '' - this.listQuery.params.vehicleType = '' + this.listQuery.params.modelNameAndCode = '' + this.listQuery.params.vinNo = '' + this.listQuery.params.carColorKey = '' + this.listQuery.params.location = '' + this.listQuery.params.userSid = '' this.getList() }, // 勾选 handleSelectionChange(row) { - console.log('row', row) - this.depositVehicleList = row const aa = [] row.forEach((element) => { - aa.push(element.sid) + aa.push({ + configName: element.configName, + configSid: element.configSid, + priceDate: element.priceDate, + vehicleAlias: element.vehicleAlias, + vinNo: element.vinNo + }) }) this.sids = aa - console.log('选择sid', this.sids) - }, - // 品牌下拉 - getType() { - // 品牌下拉 - req.selectBrand().then((res) => { - if (res.code === '200') { - this.carbrand_list = res.data - console.log('下拉框请求品牌', res.data) - } - }) - // 功能 - req.pullDown({ - type: 'vehicleFunction' - }).then((res) => { - if (res.code === '200') { - this.vehicleFunction_list = res.data - console.log('下拉框请求功能', res.data) - } - }) - // 系列 - req.pullDown({ - type: 'productLine' - }).then((res) => { - if (res.code === '200') { - this.productLine_list = res.data - console.log('下拉框请求系列', res.data) - } - }) - // 变速箱 - req.pullDown({ - type: 'gearbox' - }).then((res) => { - if (res.code === '200') { - this.gearboxType_list = res.data - console.log('下拉框请求变速箱', res.data) - } - }) - // 驱动 - req.pullDown({ - type: 'driver' - }).then((res) => { - if (res.code === '200') { - this.driveForm_list = res.data - console.log('下拉框请求驱动', res.data) - } - }) - // 排放标准 - req.pullDown({ - type: 'emissionStandard' - }).then((res) => { - if (res.code === '200') { - this.emissionStandard_list = res.data - console.log('下拉框请求排放标准', res.data) - } - }) - // 马力 - req.pullDown({ - type: 'horsepower' - }).then((res) => { - if (res.code === '200') { - this.power_list = res.data - console.log('下拉框请求马力', res.data) - } - }) - // 燃料 - req.pullDown({ - type: 'fuelType' - }).then((res) => { - if (res.code === '200') { - this.fuelType_list = res.data - console.log('下拉框请求燃料', res.data) - } - }) - // 版本 - req.pullDown({ - type: 'vehicleVersion' - }).then((res) => { - if (res.code === '200') { - this.vehicleVersion_list = res.data - console.log('下拉框请求版本', res.data) - } - }) }, // 确认 handleConfirm() { if (this.sids.length > 0) { - if (this.vinNoList.length > 0) { - console.log('已选择的数据', this.vinNoList) - for (var i = 0; i < this.vinNoList.length; i++) { - for (var j = 0; j < this.depositVehicleList.length; j++) { - if (this.vinNoList[i] === this.depositVehicleList[j].vinNo) { - const index = this.depositVehicleList.findIndex(val => { - return this.depositVehicleList[j].vinNo === this.vinNoList[i] - }) - this.depositVehicleList.splice(index, 1) - console.log('进入if判断', index) - } - } - } - } - this.$emit('handleVehicle', this.depositVehicleList) - this.$nextTick(() => { - this.$refs.multipleTable.clearSelection() - }) - this.handleReturn() + this.$emit('handleVehicle', this.sids) } else { this.$notify({ title: '提示', - message: '没有选择车辆!', + message: '请选择至少一条车辆记录!', type: 'error', duration: 2000 }) - return } }, // 返回 @@ -364,7 +239,7 @@ export default { // 排除已选信息 loadVinNo(vinNoList) { this.listQuery.params.vinNoList = vinNoList - this.getType() + this.init() this.getList() } } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue index 53cc80c95f..b1f56e8e73 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/caigoutuikuFlow/caigoutuikuEdit.vue @@ -6,7 +6,7 @@
保存 - 提交 + 提交
@@ -114,7 +114,6 @@