Kaynağa Gözat

辅配件增加仓库

pengyh 1 yıl önce
ebeveyn
işleme
57037086d2

+ 44 - 4
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -99,6 +99,18 @@
 								<el-input type="text" :value="formData.payTime" disabled></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="6">
+							<el-form-item label="入库仓库" prop="storage">
+								<el-select v-model="formData.storage" value-key="storageId":disabled="true" placeholder="请选择" style="width: 100%;">
+								    <el-option
+									  v-for="(item,index) in warehouseList"
+								      :key="index"
+								      :label="item.storageName"
+								      :value="item">
+								    </el-option>
+								</el-select>
+							</el-form-item>
+						</el-col>
 						<template v-if="formData.salesType == '工程'">
 							<el-col :span="6">
 								<el-form-item label="工程名称" :required="true">
@@ -410,6 +422,7 @@
 	import { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getNewDetail } from "@/api/auxiliaryFittings/attachmentNewReturn";
 	import { getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
+	import { storageListPageV2 } from '@/api/storage.js'
 	export default {
 		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
@@ -421,6 +434,7 @@
 				orderList: [],
 				goodsList: [],
 				mainList: [],
+				warehouseList: [],
 				isPay: false,
 				payCodeUrl: '',
 				formData: {
@@ -455,6 +469,9 @@
 					lat: '',
 					lng: '',
 					orderEnginBaseId: '',
+					storage: null,
+					storageId: '',
+					storageName: '',
 				},
 				formData1: {
 					websit_id: '',
@@ -508,9 +525,13 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.items){
 						var ress = await that.getGoods(item.goodsName, 1)
 						item.goods = {...ress.data,oldPrice:ress.data.price}
@@ -526,9 +547,13 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.websitPartsRetItemList){
 						var ress = await that.getGoods(item.goodsName, 1)
 						item.goods = {...ress.data,oldPrice:ress.data.price}
@@ -542,6 +567,15 @@
 					this.websitList = res.data
 				})
 			},
+			getWarehouseList(websitId){
+				storageListPageV2({
+			      pageNum: 1,
+			      pageSize: -1,
+			      params: [{param: "a.type", compare: "like", value: "配件"},{param: "a.status", compare: "=", value: "true"},{param: "a.websit_id", compare: "=", value: websitId}]
+			    }).then(res => {
+					this.warehouseList = res.data.records
+			    })
+			},
 			close(){
 				this.$refs.formData1.resetFields();
 			},
@@ -604,14 +638,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})
@@ -721,6 +755,8 @@
 						workerMobile: this.formData.workerMobile,
 						websitPartsRetItems: this.dataList,
 						fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+						storageId: this.formData.storageId,
+						storageName: this.formData.storageName,
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -748,6 +784,8 @@
 								workerMobile: this.formData.workerMobile,
 								websitPartsRetItems: this.dataList,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -769,6 +807,8 @@
 								workerMobile: this.formData.workerMobile,
 								websitPartsRetItems: this.dataList,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []

+ 44 - 4
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -99,6 +99,18 @@
 								<el-input type="text" :value="formData.payTime" disabled></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="6">
+							<el-form-item label="入库仓库" prop="storage">
+								<el-select v-model="formData.storage" value-key="storageId":disabled="true" placeholder="请选择" style="width: 100%;">
+								    <el-option
+									  v-for="(item,index) in warehouseList"
+								      :key="index"
+								      :label="item.storageName"
+								      :value="item">
+								    </el-option>
+								</el-select>
+							</el-form-item>
+						</el-col>
 						<template v-if="formData.salesType == '工程'">
 							<el-col :span="6">
 								<el-form-item label="工程名称" :required="true">
@@ -480,6 +492,7 @@
 	import { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getNewDetail, getAttachmentList } from "@/api/auxiliaryFittings/attachmentNewReturn";
 	import { getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
+	import { storageListPageV2 } from '@/api/storage.js'
 	export default {
 		components: { ImageUpload },
 		props: ['id','title','formType'],
@@ -492,6 +505,7 @@
 				orderList: [],
 				goodsList: [],
 				attachmentList: [],
+				warehouseList: [],
 				mainList: [],
 				isPay: false,
 				payCodeUrl: '',
@@ -529,6 +543,9 @@
 					lat: '',
 					lng: '',
 					orderEnginBaseId: '',
+					storage: null,
+					storageId: '',
+					storageName: '',
 				},
 				formData1: {
 					websit_id: '',
@@ -581,9 +598,13 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.items){
 						var ress = await that.getGoods(item.goodsName, 1)
 						item.goods = {...ress.data,oldPrice:ress.data.price}
@@ -600,9 +621,13 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.websitPartsRetItemList){
 						var ress = await that.getGoods(item.goodsName, 1)
 						item.goods = {...ress.data,oldPrice:ress.data.price}
@@ -622,6 +647,15 @@
 					this.websitList = res.data
 				})
 			},
+			getWarehouseList(websitId){
+				storageListPageV2({
+			      pageNum: 1,
+			      pageSize: -1,
+			      params: [{param: "a.type", compare: "like", value: "配件"},{param: "a.status", compare: "=", value: "true"},{param: "a.websit_id", compare: "=", value: websitId}]
+			    }).then(res => {
+					this.warehouseList = res.data.records
+			    })
+			},
 			close(){
 				this.$refs.formData1.resetFields();
 			},
@@ -684,14 +718,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})
@@ -823,6 +857,8 @@
 						websitPartsRetOldRecordList: this.oldList,
 						orderUseType: this.formData.orderUseType,
 						fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+						storageId: this.formData.storageId,
+						storageName: this.formData.storageName,
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -853,6 +889,8 @@
 								websitPartsRetOldRecordList: this.oldList,
 								orderUseType: this.formData.orderUseType,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -876,6 +914,8 @@
 								websitPartsRetOldRecordList: this.oldList,
 								orderUseType: this.formData.orderUseType,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []

+ 51 - 6
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -122,6 +122,23 @@
 						<el-col :span="2" v-else>
 							<div style="opacity: 0;">隐藏</div>
 						</el-col>
+						<el-col :span="6">
+							<el-form-item label="出库仓库" prop="storage">
+								<el-select v-model="formData.storage" value-key="storageId" @focus="()=>{
+										if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
+									}" @change="(e)=>{
+										formData.storageId = e.storageId
+										formData.storageName = e.storageName
+									}" :disabled="formData.flag != 'SAVE' && formType!=0" placeholder="请选择" style="width: 100%;">
+								    <el-option
+									  v-for="(item,index) in warehouseList"
+								      :key="index"
+								      :label="item.storageName"
+								      :value="item">
+								    </el-option>
+								</el-select>
+							</el-form-item>
+						</el-col>
 						<template v-if="formData.salesType == '工程'">
 							<el-col :span="8">
 								<el-form-item label="工程名称" prop="project" :required="true">
@@ -365,6 +382,7 @@
 	import geographicalPosi from '@/components/geographicalPosi/index.vue'
 	import ImageUpload from '@/components/file-upload'
 	import { getWorker, getCategory, getGoods, getDetail, add, edit, confirm, submit, getCode, getProject, getProjectCollectionList } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { storageListPageV2 } from '@/api/storage.js'
 	export default {
 		components: {geographicalPosi,ImageUpload},
 		props: ['id','title','formType'],
@@ -375,6 +393,7 @@
 				workerList: [],
 				projectList: [],
 				collectionList: [],
+				warehouseList: [],
 				isPay: false,
 				is_submit: true,
 				payCodeUrl: '',
@@ -413,6 +432,9 @@
 					lng: '',
 					project: {},
 					orderEnginBaseId: '',
+					storage: null,
+					storageId: '',
+					storageName: '',
 				},
 				formData1: {
 					price: '',
@@ -451,6 +473,9 @@
 					workerName: [
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
 					],
+					storage: [
+						{ required: true, message: `请选择入库仓库`, trigger: 'change' },
+					]
 				},
 				rules1: {
 					price: [
@@ -479,9 +504,13 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						project: {id: res.data.orderEnginBaseId,projectName: res.data.projectName,projectNo: res.data.projectNo,manger: res.data.manger,mobile: res.data.mobile,startTime: res.data.startTime,endTime: res.data.endTime,province: res.data.province,provinceId: res.data.provinceId,city: res.data.city,cityId: res.data.cityId,area: res.data.area,areaId: res.data.areaId,street: res.data.street,streetId: res.data.streetId,address: res.data.address,lat: res.data.lat,lng: res.data.lng}
+						project: {id: res.data.orderEnginBaseId,projectName: res.data.projectName,projectNo: res.data.projectNo,manger: res.data.manger,mobile: res.data.mobile,startTime: res.data.startTime,endTime: res.data.endTime,province: res.data.province,provinceId: res.data.provinceId,city: res.data.city,cityId: res.data.cityId,area: res.data.area,areaId: res.data.areaId,street: res.data.street,streetId: res.data.streetId,address: res.data.address,lat: res.data.lat,lng: res.data.lng},
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
+					this.getWarehouseList(res.data.websitId)
 					if(res.data.salesType == '工程'){
 						this.getProjectCollectionList(res.data.orderEnginBaseId)
 					}
@@ -502,6 +531,7 @@
 				this.formData.websitId = e.websitId
 				this.formData.websitName = e.name
 				this.getWorker()
+				this.getWarehouseList(e.websitId)
 			},
 			toAddProject(){
 				this.$router.push({
@@ -522,18 +552,27 @@
 					this.collectionList = res.data
 				})
 			},
+			getWarehouseList(websitId){
+				storageListPageV2({
+			      pageNum: 1,
+			      pageSize: -1,
+			      params: [{param: "a.type", compare: "like", value: "配件"},{param: "a.status", compare: "=", value: "true"},{param: "a.websit_id", compare: "=", value: websitId}]
+			    }).then(res => {
+					this.warehouseList = res.data.records
+			    })
+			},
 			async getGoods(goodsName,type){
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})
@@ -639,7 +678,9 @@
 							buyPeople: this.formData.buyPeople,
 							items: this.dataList,
 							orderEnginBaseId: this.formData.orderEnginBaseId,
-							salesType: this.formData.salesType
+							salesType: this.formData.salesType,
+							storageId: this.formData.storageId,
+							storageName: this.formData.storageName,
 						}).then(res => {
 							if(res.code == 200){
 								this.confirmSubmit()
@@ -727,7 +768,9 @@
 								buyPeople: this.formData.buyPeople,
 								items: this.dataList,
 								orderEnginBaseId: this.formData.orderEnginBaseId,
-								salesType: this.formData.salesType
+								salesType: this.formData.salesType,
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -750,7 +793,9 @@
 								buyPeople: this.formData.buyPeople,
 								items: this.dataList,
 								orderEnginBaseId: this.formData.orderEnginBaseId,
-								salesType: this.formData.salesType
+								salesType: this.formData.salesType,
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []

+ 9 - 8
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -116,6 +116,12 @@
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
+						<el-col :span="2" v-if="formData.flag == 'SUBMIT' && formData.payType == 'WECHAT'">
+							<div style="height: 32px;display: flex;align-items: center;cursor: pointer;" @click="wxPay()">微信支付<i class="el-icon-full-screen"></i></div>
+						</el-col>
+						<el-col :span="2" v-else>
+							<div style="opacity: 0;">隐藏</div>
+						</el-col>
 						<el-col :span="6">
 							<el-form-item label="出库仓库" prop="storage">
 								<el-select v-model="formData.storage" value-key="storageId" @focus="()=>{
@@ -133,12 +139,6 @@
 								</el-select>
 							</el-form-item>
 						</el-col>
-						<el-col :span="2" v-if="formData.flag == 'SUBMIT' && formData.payType == 'WECHAT'">
-							<div style="height: 32px;display: flex;align-items: center;cursor: pointer;" @click="wxPay()">微信支付<i class="el-icon-full-screen"></i></div>
-						</el-col>
-						<el-col :span="2" v-else>
-							<div style="opacity: 0;">隐藏</div>
-						</el-col>
 						<template v-if="formData.salesType == '工程'">
 							<el-col :span="8">
 								<el-form-item label="工程名称" prop="project" :required="true">
@@ -598,17 +598,18 @@
 				})
 			},
 			async getGoods(categoryId,goodsName,type){
+				if(!this.formData.storageId){return this.$message.warning('请先选择入库仓库!')}
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 					})
 				}

+ 30 - 4
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -445,6 +445,7 @@
 	import ImageUpload from '@/components/file-upload'
 	import { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getReturnDetail, getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
+	import { storageListPageV2 } from '@/api/storage.js'
 	export default {
 		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
@@ -457,6 +458,7 @@
 				goodsList: [],
 				mainList: [],
 				projectList: [],
+				warehouseList: [],
 				isPay: false,
 				payCodeUrl: '',
 				salesDetail: {},
@@ -492,6 +494,9 @@
 					lat: '',
 					lng: '',
 					orderEnginBaseId: '',
+					storage: null,
+					storageId: '',
+					storageName: '',
 				},
 				formData1: {
 					websit_id: '',
@@ -549,10 +554,14 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
 					this.getCategory(res.data.websitId)
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.items){
 						item.parentCategory = {categoryId: item.parentCategoryId,categoryName: item.parentCategoryName,items: [{categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}]}
 						item.goodsCategory = {categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}
@@ -570,10 +579,14 @@
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
 						worker: {nickName: res.data.workerName,userId: res.data.workerId},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
+						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : [],
+						storage: {
+							storageId: res.data.storageId
+						}
 					})
 					this.getWorker()
 					this.getCategory(res.data.websitId)
+					this.getWarehouseList(res.data.websitId)
 					for(var item of res.data.websitSalesRetItems){
 						item.parentCategory = {categoryId: item.parentCategoryId,categoryName: item.parentCategoryName,items: [{categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}]}
 						item.goodsCategory = {categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}
@@ -589,6 +602,15 @@
 					this.websitList = res.data
 				})
 			},
+			getWarehouseList(websitId){
+				storageListPageV2({
+			      pageNum: 1,
+			      pageSize: -1,
+			      params: [{param: "a.type", compare: "like", value: "配件"},{param: "a.status", compare: "=", value: "true"},{param: "a.websit_id", compare: "=", value: websitId}]
+			    }).then(res => {
+					this.warehouseList = res.data.records
+			    })
+			},
 			close(){
 				this.$refs.formData1.resetFields();
 			},
@@ -654,14 +676,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
+					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType,storageId: this.formData.storageId}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 					})
 				}
@@ -792,6 +814,8 @@
 								workerMobile: this.formData.workerMobile,
 								websitSalesRetItems: this.dataList,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -812,6 +836,8 @@
 								workerMobile: this.formData.workerMobile,
 								websitSalesRetItems: this.dataList,
 								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
+								storageId: this.formData.storageId,
+								storageName: this.formData.storageName,
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []

+ 3 - 1
src/views/auxiliaryFittings/salesManagement/oldPartsReturnFactory/index.vue

@@ -122,7 +122,9 @@ export default {
         "workerMobile": "",
         "workerName": "",
         "workerWebsitId": "",
-        "workerWebsitName": ""
+        "workerWebsitName": "",
+		storageId: '',
+		storageName: ''
       },
       isShowTab: true,
       flag: this?.$route?.params?.pageCode || '',

+ 48 - 2
src/views/auxiliaryFittings/salesManagement/oldPartsReturnFactory/mixins/basicInfo.js

@@ -1,10 +1,12 @@
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { getWebsit } from "@/api/customerManagement.js"
 import ImageUpload from '@/components/file-upload'
+import { storageListPageV2 } from '@/api/storage.js'
 export default {
   data() {
     return {
-      websitList: []
+      websitList: [],
+			warehouseList: []
     }
   },
   computed: {
@@ -67,12 +69,13 @@ export default {
               this.formData.websitName = this.websitList.find(item => item.value == val)?.label || ""
               this.formData.websitPartsRetItems = []
               this.getProductSel()
+			  this.getWarehouseList()
             }
           }
         },
         {
           name: 'el-input',
-          md: 12,
+          md: 6,
           attributes: {
             placeholder: '请输入',
             disabled: this.openType == 1 || !!~["OK", "FAIL"].indexOf(this.formData.flag)
@@ -94,6 +97,40 @@ export default {
             prop: 'factoryAddress',
           },
         },
+		{
+		  name: 'slot-component',
+		  md: 6,
+		  formItemAttributes: {
+		    label: '出库仓库',
+		    prop: 'storageId',
+		    rules: [...required],
+		  },
+		  render: (h, { props, onInput }) => {
+		    var { value } = props
+		    return (
+				<el-select
+					style="width:100%"
+					value={this.formData.storageId}
+					onInput={val => {
+						this.formData.storageId = val
+					}}
+					placeholder="请选择"
+					disabled={this.openType == 1 || !!~["OK", "FAIL"].indexOf(this.formData.flag)}
+					onChange={val => {
+						if (val) {
+							this.formData['storageName'] = this.warehouseList.find(item => item.storageId == val).storageName
+						} else {
+							this.formData['storageName'] = ''
+						}
+					}}
+				>
+					{this.warehouseList.map(item => (
+					<el-option key={item.storageId} label={item.storageName} value={item.storageId}></el-option>
+					))}
+				</el-select>
+			)
+		  }
+		},
         {
           name: 'el-input',
           md: 6,
@@ -180,5 +217,14 @@ export default {
         }))
       })
     },
+	getWarehouseList(){
+		storageListPageV2({
+	        pageNum: 1,
+	        pageSize: -1,
+	        params: [{param: "a.type", compare: "like", value: "配件"},{param: "a.status", compare: "=", value: "true"},{param: "a.websit_id", compare: "=", value: this.formData.websitId}]
+	      }).then(res => {
+			this.warehouseList = res.data.records
+	      })
+	}
   }
 }