瀏覽代碼

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

ymy 2 年之前
父節點
當前提交
6deb3ee855

+ 11 - 1
src/api/order.ts

@@ -114,6 +114,15 @@ function getInventoryByStoridAndSkuid(data : any) {
 		params: data
 	})
 }
+// 
+// 批量根据获取仓位主键和物料SKU主键获取对应库存数量
+function getInventoryByStoridsAndSkuids(data : any) {
+	return request({
+		url: '/supply/supplyInventory/getInventoryByStoridsAndSkuids',
+		method: 'POST',
+		data: data
+	})
+}
 // 详情
 function single(data:any, url : any) {
 	return request({
@@ -137,5 +146,6 @@ export default {
 	cancelSubmission,
 	getbusinessType,
 	getInventoryByStoridAndSkuid,
-	single
+	single,
+	getInventoryByStoridsAndSkuids
 }

+ 2 - 2
src/benyun/components/byBill/byBill.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="bill">
 		<div class="bill-left">
-			<div class="bill-tab" :style="{width:closeTab?0:'200px'}">
+			<div class="bill-tab" :style="{width:closeTab?0:'180px'}">
 				<div class="bill-title">导航</div>
 				<div class="bill-nav" v-if="sourceConfig" :class="{'onBill':showTab == 'source'}" @click="tabChange('source')">
 					引单</div>
@@ -455,7 +455,7 @@
 			min-height: 780px;
 
 			.bill-tab {
-				width: 200px;
+				width: 180px;
 				height: 100%;
 				transition: all .5s;
 				overflow: hidden;

+ 2 - 2
src/components/Assembly/material.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
-		<el-tag size='mini' :type="propValue===0?'primary':'danger'"
-			disable-transitions>{{propValue===0?'正常':'禁用'}}</el-tag>
+		<el-tag size='mini' :type="propValue===1?'primary':'danger'"
+			disable-transitions>{{propValue===1?'正常':'禁用'}}</el-tag>
 	</div>
 </template>
 <script lang="ts">

+ 1 - 1
src/components/Assembly/nature.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
 		<el-tag size='mini' type="primary"
-			disable-transitions>{{propValue===0?'销售属性':'基本属性'}}</el-tag>
+			disable-transitions>{{propValue===1?'销售属性':'基本属性'}}</el-tag>
 	</div>
 </template>
 <script lang="ts">

+ 3 - 3
src/components/Assembly/order.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
-		<el-tag size='mini' :type="propValue==0?'info':'primary'"
-			disable-transitions>{{propValue==0?'未接单':'已接单'}}</el-tag>
+		<el-tag size='mini' :type="propValue===0?'info':'primary'"
+			disable-transitions>{{propValue===0?'未接单':'已接单'}}</el-tag>
 	</div>
 </template>
 <script lang="ts">
@@ -12,7 +12,7 @@ import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
 		propValue : any
 		
 		created(){
-			// console.log(this.propValue);
+			console.log(this.propValue);
 		}
 	}
 

+ 136 - 135
src/store/modules/user.ts

@@ -1,149 +1,150 @@
-import {getInfo, login, logout, refreshToken, ssoLogin, ssoLogout} from '@/api/login'
+import { getInfo, login, logout, refreshToken, ssoLogin, ssoLogout } from '@/api/login'
 import request from '@/benyun/utils/request'
-import {getToken, removeToken, setExpiresIn, setToken} from '@/benyun/utils/auth'
+import { getToken, removeToken, setExpiresIn, setToken } from '@/benyun/utils/auth'
 
 const user = {
-  state: {
-    token: getToken(),
-    name: '',
-    userInfo:{},
-    avatar: '',
-    roles: [],
-    permissions: []
-  },
+	state: {
+		token: getToken(),
+		name: '',
+		userInfo: {},
+		avatar: '',
+		roles: [],
+		permissions: []
+	},
 
-  mutations: {
-    SET_TOKEN: (state:any, token:string) => {
-      state.token = token
-    },
-    SET_EXPIRES_IN: (state:any, time:any) => {
-      state.expires_in = time
-    },
-    SET_NAME: (state:any, name:string) => {
-      state.name = name
-    },
-    SET_AVATAR: (state:any, avatar:any) => {
-      state.avatar = avatar
-    },
-    SET_ROLES: (state:any, roles:any) => {
-      state.roles = roles
-    },
-    SET_PERMISSIONS: (state:any, permissions:any) => {
-      state.permissions = permissions
-    },
-    SET_USERINFO:(state:any,userInfo:any) => {
-      state.userInfo = userInfo;
-    }
-  },
+	mutations: {
+		SET_TOKEN: (state : any, token : string) => {
+			state.token = token
+		},
+		SET_EXPIRES_IN: (state : any, time : any) => {
+			state.expires_in = time
+		},
+		SET_NAME: (state : any, name : string) => {
+			state.name = name
+		},
+		SET_AVATAR: (state : any, avatar : any) => {
+			state.avatar = avatar
+		},
+		SET_ROLES: (state : any, roles : any) => {
+			state.roles = roles
+		},
+		SET_PERMISSIONS: (state : any, permissions : any) => {
+			state.permissions = permissions
+		},
+		SET_USERINFO: (state : any, userInfo : any) => {
+			state.userInfo = userInfo;
+		}
+	},
 
-  actions: {
-    // 登录
-    Login({ commit }:any, userInfo:any) {
-      const username = userInfo.username.trim()
-      const password = userInfo.password
-      const code = userInfo.code
-      const uuid = userInfo.uuid
-      return new Promise((resolve:any, reject:any) => {
+	actions: {
+		// 登录
+		Login({ commit } : any, userInfo : any) {
+			const username = userInfo.username.trim()
+			const password = userInfo.password
+			const code = userInfo.code
+			const uuid = userInfo.uuid
+			const tenantId = "000000"
+			return new Promise((resolve : any, reject : any) => {
 
-        login(username, password, code, uuid).then((res:any) => {
-          let data = res.data
-          setToken(data.access_token)
-          commit('SET_TOKEN', data.access_token)
-          setExpiresIn(data.expires_in)
-          commit('SET_EXPIRES_IN', data.expires_in)
-          resolve()
-        }).catch((error:any) => {
-          reject(error)
-        })
-      })
-    },
+				login(username, password, code, uuid, tenantId).then((res : any) => {
+					let data = res.data
+					setToken(data.access_token)
+					commit('SET_TOKEN', data.access_token)
+					setExpiresIn(data.expires_in)
+					commit('SET_EXPIRES_IN', data.expires_in)
+					resolve()
+				}).catch((error : any) => {
+					reject(error)
+				})
+			})
+		},
 
-    // 获取用户信息
-    GetInfo({ commit, state }:any) {
-      return new Promise((resolve, reject) => {
-        getInfo().then((res:any) => {
-          const user = res.user
-          const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
-          if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
-            commit('SET_ROLES', res.roles)
-            commit('SET_PERMISSIONS', res.permissions)
-          } else {
-            commit('SET_ROLES', ['ROLE_DEFAULT'])
-          }
-          commit('SET_NAME', user.userName)
-          commit('SET_AVATAR', avatar)
-          commit('SET_USERINFO',user);
-          resolve(res)
-        }).catch((error:any) => {
-          reject(error)
-        })
-      })
-    },
+		// 获取用户信息
+		GetInfo({ commit, state } : any) {
+			return new Promise((resolve, reject) => {
+				getInfo().then((res : any) => {
+					const user = res.user
+					const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
+					if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
+						commit('SET_ROLES', res.roles)
+						commit('SET_PERMISSIONS', res.permissions)
+					} else {
+						commit('SET_ROLES', ['ROLE_DEFAULT'])
+					}
+					commit('SET_NAME', user.userName)
+					commit('SET_AVATAR', avatar)
+					commit('SET_USERINFO', user);
+					resolve(res)
+				}).catch((error : any) => {
+					reject(error)
+				})
+			})
+		},
 
-    // 刷新token
-    RefreshToken({commit, state}:any) {
-      return new Promise((resolve:any, reject:any) => {
-        refreshToken().then((res:any) => {
-          setExpiresIn(res.data)
-          commit('SET_EXPIRES_IN', res.data)
-          resolve()
-        }).catch((error:any) => {
-          reject(error)
-        })
-      })
-    },
+		// 刷新token
+		RefreshToken({ commit, state } : any) {
+			return new Promise((resolve : any, reject : any) => {
+				refreshToken().then((res : any) => {
+					setExpiresIn(res.data)
+					commit('SET_EXPIRES_IN', res.data)
+					resolve()
+				}).catch((error : any) => {
+					reject(error)
+				})
+			})
+		},
 
-    // 退出系统
-    LogOut({ commit, state }:any) {
-      return new Promise((resolve:Function, reject:Function) => {
-        logout().then(() => {
-          commit('SET_TOKEN', '')
-          commit('SET_ROLES', [])
-          commit('SET_PERMISSIONS', [])
-          removeToken()
-          resolve()
-        }).catch((error:any) => {
-          reject(error)
-        })
-      })
-    },
+		// 退出系统
+		LogOut({ commit, state } : any) {
+			return new Promise((resolve : Function, reject : Function) => {
+				logout().then(() => {
+					commit('SET_TOKEN', '')
+					commit('SET_ROLES', [])
+					commit('SET_PERMISSIONS', [])
+					removeToken()
+					resolve()
+				}).catch((error : any) => {
+					reject(error)
+				})
+			})
+		},
 
-    // 前端 登出
-    FedLogOut({ commit }:any) {
-      return new Promise((resolve:Function) => {
-        commit('SET_TOKEN', '')
-        removeToken()
-        resolve()
-      })
-    },
+		// 前端 登出
+		FedLogOut({ commit } : any) {
+			return new Promise((resolve : Function) => {
+				commit('SET_TOKEN', '')
+				removeToken()
+				resolve()
+			})
+		},
 
-    // 统一系统登录
-    ssoLogin({commit}:any, userInfo:any) {
-      const username = userInfo.username.trim()
-      const password = userInfo.password
-      const code = userInfo.code
-      const uuid = userInfo.uuid
-      const redirectUri = userInfo.redirectUri
-      const appId = userInfo.appId
-      return new Promise((resolve:Function, reject:Function) => {
-        ssoLogin(username, password, code, uuid, redirectUri, appId).then((res:any) => {
-          (window as any).location.href = res
-          resolve()
-        }).catch((error:any) => {
-          reject(error)
-        })
-      })
-    },
+		// 统一系统登录
+		ssoLogin({ commit } : any, userInfo : any) {
+			const username = userInfo.username.trim()
+			const password = userInfo.password
+			const code = userInfo.code
+			const uuid = userInfo.uuid
+			const redirectUri = userInfo.redirectUri
+			const appId = userInfo.appId
+			return new Promise((resolve : Function, reject : Function) => {
+				ssoLogin(username, password, code, uuid, redirectUri, appId).then((res : any) => {
+					(window as any).location.href = res
+					resolve()
+				}).catch((error : any) => {
+					reject(error)
+				})
+			})
+		},
 
-    // 退出统一系统
-    ssoLogOut({commit, state}:any) {
-      return new Promise((resolve:Function, reject:Function) => {
-        ssoLogout().then(() => {
-          resolve()
-        })
-      })
-    },
-  }
+		// 退出统一系统
+		ssoLogOut({ commit, state } : any) {
+			return new Promise((resolve : Function, reject : Function) => {
+				ssoLogout().then(() => {
+					resolve()
+				})
+			})
+		},
+	}
 }
 
-export default user
+export default user

+ 10 - 10
src/views/audit/attribute/index.vue

@@ -9,8 +9,8 @@
 		<el-dialog :title="popTitle+'属性'" :visible.sync="dialogFormVisible" width="50%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:status class="clearfix">
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">正常</el-radio>
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">正常</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="2">禁用</el-radio>
 				</template>
 				<template v-slot:attributeValue="{value}">
 					<div style="margin-bottom: 20px;" v-if="tableConfig.length>0">
@@ -66,7 +66,7 @@
 		timeNum = 0;
 		timer : any = null
 		popTitle : any = ''
-		radio : any = 0
+		radio : any = 1
 		dialogFormVisible : boolean = false
 		tableConfig : any = []
 		config : any = {
@@ -99,10 +99,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '正常'
 								}, {
-									value: 1,
+									value: 2,
 									label: '禁用'
 								}]
 							}
@@ -119,10 +119,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '销售属性'
 								}, {
-									value: 1,
+									value: 2,
 									label: '基本属性'
 								}]
 							}
@@ -229,10 +229,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '销售属性'
 								}, {
-									value: 1,
+									value: 2,
 									label: '基本属性'
 								}]
 							}
@@ -362,7 +362,7 @@
 			this.dialogFormVisible = true;
 			this.radio = e.status
 			this.tableConfig = JSON.parse(e.attributeValue);
-			e.attributeTypeName = e.attributeType === 0 ? '销售属性' : '基本属性';
+			e.attributeTypeName = e.attributeType === 1 ? '销售属性' : '基本属性';
 			setTimeout(() => {
 				console.log('编辑 ==> ', e);
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);

+ 5 - 5
src/views/audit/brand/index.vue

@@ -9,8 +9,8 @@
 		<el-dialog :title="popTitle+'品牌'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:status class="clearfix">
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">正常</el-radio>
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">正常</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="2">禁用</el-radio>
 				</template>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
@@ -31,7 +31,7 @@
 		timeNum = 0;
 		timer : any = null
 		popTitle : any = ''
-		radio : any = 0
+		radio : any = 1
 		dialogFormVisible : boolean = false
 		config : any = {
 			search: {
@@ -75,10 +75,10 @@
 								placeholder: '请选择状态',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '正常'
 								}, {
-									value: 1,
+									value: 2,
 									label: '禁用'
 								}]
 							}

+ 44 - 28
src/views/audit/depots/index.vue

@@ -3,9 +3,9 @@
 		<transition-group name="fade" style="position: relative;width: 100%;display: flex;">
 			<div class="bill-main" v-show="isShow==='ckb'" key="item">
 				<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-					@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
+					@resert="getDataList" @detail="openEdit" @onRefresh="onRefresh">
 				</module-view>
-				<!-- 新增/编辑弹窗 -->
+				<!-- 注册/编辑弹窗 -->
 				<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="30%">
 					<by-form :propConfig="addConfig" ref="addFormId"></by-form>
 					<div slot="footer" class="dialog-footer">
@@ -18,12 +18,12 @@
 				<module-view :propConfig="config2" ref="moduleView2" @clickHandle="clickHandle2" @detail="openEdit2"
 					@pagination="getDataList2" @search="getDataList2" @resert="getDataList2" @onRefresh="onRefresh2">
 				</module-view>
-				<!-- 新增/编辑弹窗 -->
+				<!-- 注册/编辑弹窗 -->
 				<el-dialog :title="popTitle+'仓位'" :visible.sync="dialogFormVisible2" width="30%">
 					<by-form :propConfig="addConfig2" ref="addFormId2">
 						<template v-slot:organizationName="{value}">
-							<el-input placeholder="请选择所属机构名称" size="small" v-model="value.organizationName" class="input-organizationName"
-								:readonly="true">
+							<el-input placeholder="请选择所属机构名称" size="small" v-model="value.organizationName"
+								class="input-organizationName" :readonly="true">
 								<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
 							</el-input>
 						</template>
@@ -88,10 +88,18 @@
 			},
 			tool: {
 				tools: {
-					add: true,
 					search: true,
 					refresh: true
-				}
+				},
+				customTools: [
+					{
+						name: '注册', icon: 'el-icon-plus', audit: [''], event: {
+							click: () => {
+								(this as any).onAdd();
+							}
+						}
+					}
+				]
 			},
 			table: {
 				attr: {
@@ -231,11 +239,25 @@
 			tool: {
 				tools: {
 					return: true,
-					add: true,
-					delete: true,
 					search: true,
 					refresh: true
-				}
+				},
+				customTools: [
+					{
+						name: '注册', icon: 'el-icon-plus', audit: [''], event: {
+							click: () => {
+								(this as any).onAdd2();
+							}
+						}
+					},
+					{
+						name: '删除', icon: 'el-icon-delete', audit: [''], event: {
+							click: () => {
+								(this as any).onDelete('moduleView2', 'maindataStoringLocation')
+							}
+						}
+					},
+				]
 			},
 			table: {
 				attr: {
@@ -360,7 +382,6 @@
 						label: '所属机构名称',
 						prop: 'organizationName',
 						slot: true,
-						// component: 'by-input',
 					},
 					{
 						labelWidth: '110px',
@@ -398,13 +419,13 @@
 				this.getDataList()
 			}, 500)
 		}
-		// 仓库确认新增/编辑
+		// 仓库确认注册/编辑
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
 				console.log(query);
 				this.dialogFormVisible = false;
-				if (this.popTitle === '新增') {
+				if (this.popTitle === '注册') {
 					api.saveList(query, 'maindataStorehouse').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success(this.popTitle + '成功!');
@@ -421,7 +442,7 @@
 				}
 			})
 		}
-		// 仓位确认新增/编辑
+		// 仓位确认注册/编辑
 		confirm2() {
 			(this as any).$refs.addFormId2.validate().then(() => {
 				let query = (this as any).$refs.addFormId2.getValue();
@@ -429,7 +450,7 @@
 				query.storehouseId = this.tableData.id;
 				query.idDelete = 0;
 				this.dialogFormVisible2 = false;
-				if (this.popTitle === '新增') {
+				if (this.popTitle === '注册') {
 					api.saveList(query, 'maindataStoringLocation').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success(this.popTitle + '成功!');
@@ -451,7 +472,7 @@
 			api.single({ id: e }, 'maindataStorehouse').then((res : any) => {
 				if (res.code === 200) {
 					this.tableData = res.data;
-					this.tableData.subList.map((v:any) => {
+					this.tableData.subList.map((v : any) => {
 						v.ckName = this.tableData.name;
 					});
 					(this.$refs.moduleView2 as any).setTableValue(this.tableData.subList);
@@ -496,7 +517,7 @@
 			query.storehouseId = this.tableData.id;
 			api.pageList(query, 'maindataStoringLocation').then((res : any) => {
 				if (res.code === 200) {
-					res.data.records.map((v:any) => {
+					res.data.records.map((v : any) => {
 						v.ckName = this.tableData.name;
 					});
 					(this.$refs.moduleView2 as any).setTableValue(res.data.records);
@@ -510,18 +531,13 @@
 			})
 		}
 		// 工具栏方法
-		clickHandle(e : any) {
-			if (e === 'onAdd') this.onAdd();
-		}
-		// 工具栏方法
 		clickHandle2(e : any) {
 			if (e === 'onAdd') this.onAdd2();
-			if (e === 'onDelete') this.onDelete('moduleView2', 'maindataStoringLocation');
 			if (e === 'onReturn') this.isShow = 'ckb';
 		}
-		// 打开新增
+		// 打开注册
 		onAdd() {
-			this.popTitle = '新增'
+			this.popTitle = '注册'
 			this.dialogFormVisible = true;
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
@@ -535,9 +551,9 @@
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)
 		}
-		// 打开新增
+		// 打开注册
 		onAdd2() {
-			this.popTitle = '新增'
+			this.popTitle = '注册'
 			this.dialogFormVisible2 = true;
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId2) (this as any).$refs.addFormId2.setValue({});
@@ -566,7 +582,7 @@
 		// 查看仓位
 		changeTab(item : any) {
 			this.tableData = item;
-			this.tableData.subList.map((v:any) => {
+			this.tableData.subList.map((v : any) => {
 				v.ckName = this.tableData.name;
 			})
 			console.log('仓库表数据 ==> ', this.tableData);
@@ -629,7 +645,7 @@
 		}
 		// 仓位操作删除
 		doDelete3(item : any, url : any) {
-			console.log('仓位操作删除:',item,url);
+			console.log('仓位操作删除:', item, url);
 			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',

+ 4 - 4
src/views/audit/order/index.vue

@@ -204,10 +204,10 @@
 										placeholder: '请选择状态',
 										clearable: true,
 										data: [{
-											value: 0,
+											value: 1,
 											label: '未接单'
 										}, {
-											value: 1,
+											value: 2,
 											label: '已接单'
 										}]
 									}
@@ -292,7 +292,7 @@
 								name: '接单',
 								event: {
 									show: (item : any) => {
-										return item.status === 0
+										return item.status === 1
 									},
 									click: (item : any) => {
 										(this as any).getOrder(item)
@@ -431,7 +431,7 @@
 					if (res.code === 200) {
 						this.getDataList();
 						this.$message.success('接单成功!');
-						this.$alert('是否跳转销售订单', '提示', {
+						this.$confirm('是否跳转销售订单', '提示', {
 							confirmButtonText: '确定',
 							cancelButtonText: '取消',
 						}).then(() => {

+ 31 - 27
src/views/audit/orderTask/index.vue

@@ -27,6 +27,7 @@
 		baseInfo : any = {}
 		isSubmit : any = false
 		isChange : any = false
+		dataId : any = ''
 		// 右边
 		supplierInfo : any = {} // 机构信息
 		tableData : any = []
@@ -45,11 +46,11 @@
 						save: true,
 					}
 				},
-				log:{
-				  request:{
-				    url:'/supply/supplyTaskOrderOperateLog/page',
-				    method:'GET'
-				  }
+				log: {
+					request: {
+						url: '/supply/supplyTaskOrderOperateLog/page',
+						method: 'GET'
+					}
 				},
 				form: {
 					attr: {
@@ -166,11 +167,6 @@
 										},
 									}
 								},
-								{
-									width: 140,
-									title: '已交付数量',
-									field: 'deliveryNumber',
-								},
 								{
 									width: 140,
 									title: '单价',
@@ -853,6 +849,10 @@
 			console.log('保存tabType ==>', this.tabType);
 			(this as any).$refs.bill.$refs.billForm.validate().then(() => {
 				let query = (this.$refs.bill as any).getBillFormValue(); // 获取单据数据
+				// 手机验证
+				let reg = /^1[3456789]\d{9}$/;
+				// let reg = /^0\d{2,3}-\d{7,8}$/ 
+				if (query.deliveryPhone && !reg.test(query.deliveryPhone)) return this.$message.warning('请输入正确手机号码');
 				// 供应商数据
 				if (!query.organizationName) query.organizationName = this.supplierInfo.name;
 				if (!query.organizationId) query.organizationId = this.supplierInfo.id;
@@ -879,12 +879,13 @@
 				if (this.isAdd) {
 					api.saveList(query, 'supplyTaskOrder').then((res : any) => {
 						if (res.code === 200) {
-							// this.isAdd = false;
-							// this.isChange = false;
-							// this.isSubmit = true;
-							this.getDataList();
+							this.isAdd = false;
+							this.isChange = false;
+							this.isSubmit = true;
 							this.$message.success('保存成功');
-							(this.$refs.bill as any).showTab = 'all';
+							this.dataId = res.data;
+							// this.getDataList();
+							// (this.$refs.bill as any).showTab = 'all';
 						} else this.$message.error(res.msg);
 					})
 				} else if (this.tabType === 'all' || this.tabType === 'draftsBox') {
@@ -912,11 +913,11 @@
 				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 				billConfig.form.attr.readonly = false; // 设置只读
 				billConfig.tool.tools = { save: true, };
-				// if (e === 'all') {
-				// 	billConfig.tool.tools = { save: true, smt: true };
-				// 	this.tableData = [];
-				// 	(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
-				// }
+				if (e === 'all') {
+					billConfig.tool.tools = { save: true, smt: true };
+					this.tableData = [];
+					(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
+				};
 				billConfig.tableConfig[0].tool.tools = { add: true };
 				this.isAdd = true;
 				(this.$refs.bill as any).setBillConfig(billConfig);
@@ -938,12 +939,12 @@
 						// 已提交
 						if (parentData.submitState === 1) {
 							loading.close();
-							return this.setReadonly(parentData,true)
+							return this.setReadonly(parentData, true)
 						};
 						// 回收站
-						if(this.tabType === 'recycleBin' ){
+						if (this.tabType === 'recycleBin') {
 							loading.close();
-							return this.setReadonly(parentData,false)
+							return this.setReadonly(parentData, false)
 						};
 						let data = parentData.suborderList
 						data.map((v : any, i : any) => {
@@ -977,17 +978,18 @@
 						(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
 						(this.$refs.bill as any).setBillTableValue(data, 0);// 设置第1张单据表格数据
 						this.isAdd = false;
+						this.dataId = '';
 						(this.$refs.bill as any).showTab = 'bill';
 						loading.close();
 					} else {
 						loading.close();
-						this.setReadonly(parentData,false);
+						this.setReadonly(parentData, false);
 					};
 				}
 			})
 		}
 		// 设置只读
-		setReadonly(e : any,isReturn:any) {
+		setReadonly(e : any, isReturn : any) {
 			let readonly = (this as any).$lodash.cloneDeep(this.config.bill);
 			readonly.form.attr.readonly = true; // 设置只读
 			readonly.tool.tools = {};
@@ -1031,11 +1033,13 @@
 						type: 'warning',
 						center: true
 					}).then(() => {
-						api.submitTo({ id: this.baseInfo.id }, 'supplyTaskOrder').then((res : any) => {
+						let id = this.dataId ? this.dataId : this.baseInfo.id;
+						api.submitTo({ id: id }, 'supplyTaskOrder').then((res : any) => {
 							if (res.code === 200) {
 								this.$message.success('提交成功');
 								this.clickTab(this.tabType);
 								this.isSubmit = false;
+								this.dataId = '';
 								(this.$refs.bill as any).showTab = this.tabType;
 							} else this.$message.error(res.msg)
 						})
@@ -1193,7 +1197,7 @@
 			if (e === 'recycleBin') this.getSelectDeleteList({}) // 回收站数据
 			if (e === 'bill') {
 				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
-				billConfig.tool.tools={};
+				billConfig.tool.tools = {};
 				billConfig.tool.customTools = [];
 				(this.$refs.bill as any).setBillConfig(billConfig);
 			}

+ 91 - 63
src/views/audit/outbound/index.vue

@@ -123,11 +123,11 @@
 						save: true,
 					}
 				},
-				log:{
-				  request:{
-				    url:'/supply/supplyOutOrderOperateLog/page',
-				    method:'GET'
-				  }
+				log: {
+					request: {
+						url: '/supply/supplyOutOrderOperateLog/page',
+						method: 'GET'
+					}
 				},
 				form: {
 					attr: {
@@ -212,8 +212,8 @@
 							attr: {
 								size: 'mini',
 								height: 500,
-								align: 'center',
-								readonly: true
+								align: 'left',
+								readonly: true,
 							},
 							columns:
 								[{
@@ -254,10 +254,15 @@
 									}
 								},
 								{
-									width: 110,
-									title: '已交付数量',
+									width: 100,
+									title: '应出数量',
 									field: 'deliveryNumber',
 								},
+								{
+									width: 110,
+									title: '出库数量',
+									field: 'outNumber',
+								},
 								{
 									width: 100,
 									title: '单价',
@@ -779,26 +784,38 @@
 		}
 		// 引单
 		citationOrder() {
-			let data : any = (this as any).$refs.bill.getSourceTableSelectData(0);
-			console.log(data);
-			if (data.length <= 0) return this.$message.warning('请选择引单数据');
-			data = data.map((item : any) => {
-				item.receiveAddress = item.address
-				item.receive = item.consignee
-				item.receivePhone = item.phone
-				const { ...newData } = item
-				return newData
+			let parentData : any = (this as any).$refs.bill.getSourceTableSelectData(0);
+			if (parentData.length <= 0) return this.$message.warning('请选择引单数据');
+			let loading = this.$loading({ target: '.main-container' });
+			api.single({ id: parentData[0].id }, 'supplyPurchaseOrder').then((res : any) => {
+				if (res.code === 200) {
+					parentData = res.data ? [res.data] : parentData;
+					parentData = parentData.map((item : any, i : any) => {
+						item.dataIndex = i;
+						item.receiveAddress = item.address
+						item.receive = item.consignee
+						item.receivePhone = item.phone
+						const { ...newData } = item
+						return newData
+					})
+					let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
+					parentData[0].suborderList.map((v : any) => {
+						v.deliveryNumber = v.number - v.outNumber;
+						if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
+					});
+					this.isAdd = true;
+					this.tableData = parentData[0];
+					// console.log('this.tableData ==> ', this.tableData);
+					billConfig.tool.tools = { save: true };
+					(this.$refs.bill as any).showTab = 'bill';
+					loading.close();
+					setTimeout(() => {
+						(this.$refs.bill as any).setBillConfig(billConfig);
+						(this.$refs.bill as any).setBillFormValue(parentData[0]); // 设置单据表单数据
+						(this.$refs.bill as any).setBillTableValue(parentData[0].suborderList, 0);// 设置第1张单据表格数据
+					}, 0)
+				}
 			})
-			let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
-			// billConfig.tool.tools = { save: true, smt: true };
-			// this.isAdd = true;
-			billConfig.tool.tools = { save: true };
-			(this.$refs.bill as any).showTab = 'bill';
-			setTimeout(() => {
-				(this.$refs.bill as any).setBillConfig(billConfig);
-				(this.$refs.bill as any).setBillFormValue(data[0]); // 设置单据表单数据
-				(this.$refs.bill as any).setBillTableValue(data[0].suborderList, 0);// 设置第1张单据表格数据
-			}, 0)
 		}
 		// 获取机构数据
 		getSupplierModal(e : any) {
@@ -852,8 +869,8 @@
 				query.suborderList = (this.$refs.bill as any).getBillTableData(0);
 				if (query.suborderList.length > 0) {
 					for (let v of query.suborderList) {
-						// if (!v.number || v.number <= 0) return this.$message.warning('请输入正确物料数量');
 						if (!v.unitPrice || v.unitPrice <= 0) return this.$message.warning('请输入正确物料单价');
+						if (v.deliveryNumber < v.number) return this.$message.warning('数量不能大于应出数量');
 						if (v.number > v.inventory) return this.$message.warning('出库数据不能大于库存数量');
 						v.taskOrderId = query.id;
 						v.purchaseSuborderId = v.id;
@@ -916,7 +933,6 @@
 							loading.close();
 							return this.setReadonly(parentData)
 						}
-						let data = parentData.suborderList;
 						let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 						if (billConfig.tableConfig[0].table.columns.at(-1).title != '操作') {
 							billConfig.tableConfig[0].table.columns.push({
@@ -938,29 +954,35 @@
 						billConfig.form.attr.readonly = false; // 设置只读
 						billConfig.tool.tools = { save: true, };
 						if (this.tabType === 'draftsBox' || parentData.submitState === 0) billConfig.tool.tools = { save: true, smt: true };
+						let data : any = parentData.suborderList;
+						let array : any = [];
 						data.map((v : any, i : any) => {
-							console.log(v.materialSku);
 							v.dataIndex = i;
 							v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
-							//  查库存
-							api.getInventoryByStoridAndSkuid({
-								storidId: v.storehouseId,
+							array.push({
+								storidId: v.storingLocationId,
 								skuid: v.materialSku,
-							}).then((res : any) => {
-								if (res.code === 200) {
-									v.inventory = res.data;
-									if (data.length === (i + 1)) {
-										this.tableData = data;
-										(this.$refs.bill as any).setBillConfig(billConfig);
-										(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
-										(this.$refs.bill as any).setBillTableValue(data, 0);// 设置第1张单据表格数据
-										this.isAdd = false;
-										(this.$refs.bill as any).showTab = 'bill';
-										loading.close();
-									}
-								}
 							})
 						});
+						console.log('array', array);
+						//  查库存
+						api.getInventoryByStoridsAndSkuids(array).then((res : any) => {
+							if (res.code === 200) {
+								console.log(res);
+								let newData : any = [];
+								res.data.map((v : any, i : any) => {
+									newData.push(Object.assign(data[i], v))
+								})
+								console.log('newData', newData);
+								this.tableData = newData;
+								(this.$refs.bill as any).setBillConfig(billConfig);
+								(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
+								(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
+								this.isAdd = false;
+								(this.$refs.bill as any).showTab = 'bill';
+								loading.close();
+							}
+						})
 					} else {
 						this.setReadonly(parentData);
 					};
@@ -978,26 +1000,32 @@
 			}
 			readonly.tableConfig[0].table.columns = readonly.tableConfig[0].table.columns.filter((v : any) => v.title != '操作');
 			let data = e.suborderList;
-			data.map((v : any, i : any) => {
+			let array : any = [];
+			data.map((v : any) => {
 				v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
-				//  查库存
-				api.getInventoryByStoridAndSkuid({
-					storidId: v.storehouseId,
+				array.push({
+					storidId: v.storingLocationId,
 					skuid: v.materialSku,
-				}).then((res : any) => {
-					if (res.code === 200) {
-						v.inventory = res.data;
-						if (data.length === (i + 1)) {
-							(this.$refs.bill as any).setBillConfig(readonly);
-							(this.$refs.bill as any).setBillFormValue(e);// 设置单据表单数据
-							(this.$refs.bill as any).setBillTableValue(data, 0);// 设置第1张单据表格数据
-							this.isAdd = false;
-							(this.$refs.bill as any).showTab = 'bill';
-							loading.close();
-						}
-					}
 				})
 			});
+			console.log('array', array);
+			//  查库存
+			api.getInventoryByStoridsAndSkuids(array).then((res : any) => {
+				if (res.code === 200) {
+					let newData : any = []
+					res.data.map((v : any, i : any) => {
+						newData.push(Object.assign(data[i], v))
+					})
+					console.log('newData', newData);
+					this.tableData = newData;
+					(this.$refs.bill as any).setBillConfig(readonly);
+					(this.$refs.bill as any).setBillFormValue(e);// 设置单据表单数据
+					(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
+					this.isAdd = false;
+					(this.$refs.bill as any).showTab = 'bill';
+					loading.close();
+				}
+			})
 		}
 		// 工具栏提交
 		onSmt(e : any) {

+ 18 - 43
src/views/audit/productClassification/index.vue

@@ -3,22 +3,20 @@
 		<div class="bill-left">
 			<div class="bill-tab">
 				<div class="tab-title">导航</div>
-				<!-- <el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props"
-					@node-click="handleNodeClick"></el-tree> -->
 					<side-tree :propConfig="treeConfig" @onChange="onChangeTree" />
 			</div>
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit"  @onRefresh="onRefresh">
+				@resert="onRefresh" @clickHandle="clickHandle" @detail="openEdit"  @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
 		<el-dialog :title="popTitle+'商品分类'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:status class="clearfix">
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">正常</el-radio>
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">正常</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="2">禁用</el-radio>
 				</template>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
@@ -48,7 +46,7 @@
 		timeNum = 0;
 		timer : any = null
 		popTitle : any = ''
-		radio : any = 0
+		radio : any = 1
 		dialogFormVisible : boolean = false
 		treeConfig={
 			attr:{
@@ -108,10 +106,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '正常'
 								}, {
-									value: 1,
+									value: 2,
 									label: '禁用'
 								}]
 							}
@@ -243,7 +241,6 @@
 			]
 		}
 		mounted() {
-			// this.getTreeList()
 			this.timer = setInterval(() => {
 				this.getDataList()
 			}, 500)
@@ -264,18 +261,6 @@
 				}
 			})
 		}
-		// 获取树型导航数据
-		getTreeList() {
-			api.treeList('maindataMaterialCategory').then((res : any) => {
-				if (res.code === 200) {
-					this.data = res.data;
-					this.expandedKeys.push(res.data[0].id)
-					res.data[0].children.map((v : any) => {
-						this.expandedKeys.push(v.id)
-					})
-				} else this.failHandle(res)
-			})
-		}
 		// 确认新增/编辑
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
@@ -291,7 +276,6 @@
 								type: 'success',
 								message: this.popTitle + '成功!'
 							});
-							this.getTreeList();
 							this.getDataList();
 						} else this.failHandle(res)
 					})
@@ -302,7 +286,6 @@
 								type: 'success',
 								message: this.popTitle + '成功!'
 							});
-							this.getTreeList();
 							this.getDataList();
 						} else this.failHandle(res)
 					})
@@ -320,7 +303,7 @@
 			}
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
-			query.parentId = this.parentId;
+			if(this.parentId)query.parentId = this.parentId;
 			let newData : any = {}
 			for (let key in query) {
 				if (query[key].toString()) {
@@ -328,7 +311,10 @@
 				}
 			}
 			console.log('表单字段 ==> ', newData);
-			api.pageList(newData, 'maindataMaterialCategory').then((res : any) => {
+			this.getPageList(newData)
+		}
+		getPageList(query:any){
+			api.pageList(query, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -350,7 +336,7 @@
 		onAdd() {
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
-			this.radio = 0
+			this.radio = 1
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
@@ -388,7 +374,6 @@
 			}).then(() => {
 				api.deleteList({ ids: ids }, 'maindataMaterialCategory').then((res : any) => {
 					if (res.code === 200) {
-						this.getTreeList();
 						this.getDataList();
 						this.$message({
 							type: 'success',
@@ -416,7 +401,6 @@
 						if (v.data.length > 0) return this.$message({ type: 'error', message: '此数据有子节点,不能进行删除!' })
 						api.deleteList({ ids: item.id }, 'maindataMaterialCategory').then((res : any) => {
 							if (res.code === 200) {
-								this.getTreeList();
 								this.getDataList();
 								this.$message({
 									type: 'success',
@@ -433,22 +417,13 @@
 				});
 			});
 		}
-		// 刷新
-		onRefresh(){
-			this.loading = this.$loading({ target: '.main-container' });
+		// 刷新/重置
+		onRefresh() {
+			let loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
-			api.pageList({}, 'maindataMaterialCategory').then((res : any) => {
-				if (res.code === 200) {
-					(this.$refs.moduleView as any).setTableValue(res.data.records);
-					let page = {
-						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
-						total: res.data.total //总条数
-					};
-					(this.$refs.moduleView as any).setPage(page);
-					this.loading.close();
-				} else this.$message.error(res.msg);
-			})
+			this.parentId = '';
+			this.getPageList({});
+			loading.close();
 		}
 		//导出
 		onExport() {

+ 161 - 143
src/views/audit/productManagement/index.vue

@@ -4,8 +4,6 @@
 			<div class="bill-left" v-show="isShow==='home'" key="item">
 				<div class="bill-tab">
 					<div class="bill-title">导航</div>
-					<!-- 					<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props"
-						@node-click="handleNodeClick"></el-tree> -->
 					<side-tree :propConfig="treeConfig" @onChange="onChangeTree" />
 				</div>
 			</div>
@@ -49,7 +47,7 @@
 						</template>
 						<template v-slot:attributeName>
 							<div v-if="isSingle" key="item4">
-								<by-table :propConfig="singleTable" @onChangeRow="getSingleValue" ref="singeTable"></by-table>
+								<by-table :propConfig="singleTable" @onChangeRow="getInputValue" ref="singeTable"></by-table>
 							</div>
 							<div v-if="!isSingle" key="item5">
 								<el-select :value="selectValue" clearable placeholder="请选择" style="width: 19.5%;"
@@ -216,7 +214,7 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 20
+							defaultValue: 0
 						},
 					}
 				},
@@ -229,7 +227,6 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							defaultValue: '袋'
 						},
 					}
 				},
@@ -242,8 +239,7 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							type: "number",
-							defaultValue: 100
+							type: "integer",
 						},
 					}
 				},
@@ -256,8 +252,7 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							type: "number",
-							defaultValue: 100
+							type: "integer",
 						},
 					}
 				},
@@ -271,7 +266,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 5
 						},
 					}
 				},
@@ -285,7 +279,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 5
 						},
 					}
 				},
@@ -299,7 +292,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 18
 						},
 					}
 				},
@@ -313,7 +305,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 6
 						},
 					}
 				},
@@ -377,7 +368,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 20
 						},
 					}
 				},
@@ -390,7 +380,6 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							defaultValue: '袋'
 						},
 					}
 				},
@@ -404,7 +393,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -418,7 +406,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -432,7 +419,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 500
 						},
 					}
 				},
@@ -446,7 +432,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 28
 						},
 					}
 				},
@@ -460,7 +445,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 18
 						},
 					}
 				},
@@ -474,7 +458,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 6
 						},
 					}
 				},
@@ -504,21 +487,15 @@
 			attr: {
 				size: 'small',
 				rules: {
-					name: [{
-						required: true, message: '请输入名称', trigger: 'blur'
-					}],
-					basePrice: [{
-						required: true, message: '请输入基本售价', trigger: 'blur'
-					}],
-					categoryName: [{
-						required: true, message: '请输入物料分类', trigger: 'change'
-					}],
-					vmCategoryName: [{
-						required: true, message: '请输入虚拟分类', trigger: 'change'
-					}],
-					organizationCategoryName: [{
-						required: true, message: '请输入机构商品分类', trigger: 'change'
-					}],
+					// name: [{
+					// 	required: true, message: '请输入名称', trigger: 'blur'
+					// }],
+					// basePrice: [{
+					// 	required: true, message: '请输入基本售价', trigger: 'blur'
+					// }],
+					// categoryName: [{
+					// 	required: true, message: '请输入物料分类', trigger: 'change'
+					// }],
 				}
 			},
 			columns: [
@@ -663,7 +640,7 @@
 						}
 					},
 					{
-						labelWidth:'116px',
+						labelWidth: '116px',
 						span: 6,
 						label: '机构商品分类',
 						prop: 'organizationCategoryName',
@@ -886,7 +863,6 @@
 			},
 		}
 		mounted() {
-			// this.getTreeList()
 			this.getAttribute()
 			this.timer = setInterval(() => {
 				this.getDataList()
@@ -923,12 +899,30 @@
 				let data : any = {}
 				// 多规格
 				if (query.materialSpec === 1) {
-					if (this.tableList.length <= 0 || this.attributeList.length <= 0) return (this as any).$message({ type: 'warning', message: '多规格商品,物料属性不能为空!' });
+					if (this.tableList.length <= 0 || this.attributeList.length <= 0) return (this as any).$message.warning('多规格商品,物料属性不能为空!');
+
+					console.log('多规格表格数据 ==> ', this.tableList);
+					for (let v of this.tableList) {
+						if (!v.price) return this.$message.warning('物料价格必填');
+						if (parseInt(v.price) <= 0) return this.$message.warning('物料价格不能小于1');
+						if (!v.unit) return this.$message.warning('物料单位必填');
+						if (!v.stock) return this.$message.warning('物料库存必填');
+						if (parseInt(v.stock) <= 0) return this.$message.warning('物料库存必须为自然数');
+						if (!v.shelfLife) return this.$message.warning('物料保质期必填');
+						if (parseInt(v.shelfLife) <= 0) return this.$message.warning('物料保质期必须为自然数');
+						if (!v.weight) return this.$message.warning('物料重量必填');
+						if (parseInt(v.weight) <= 0) return this.$message.warning('物料重量不能小于1');
+						if (!v.length) return this.$message.warning('物料长必填');
+						if (parseInt(v.length) <= 0) return this.$message.warning('物料长不能小于1');
+						if (!v.width) return this.$message.warning('物料宽必填');
+						if (parseInt(v.width) <= 0) return this.$message.warning('物料宽不能小于1');
+						if (!v.height) return this.$message.warning('物料高必填');
+						if (parseInt(v.height) <= 0) return this.$message.warning('物料高不能小于1');
+					};
 					data = { maindataMaterial: query, maindataMaterialSkus: this.tableList }
 					let newArray : any = []
 					let materialSpecData : any = []
 					let attributeLength = this.attributeList.length
-					console.log('表格数据 ==> ', this.tableList);
 					this.tableList.map((v : any) => {
 						for (let kyes in v) {
 							if (kyes.indexOf('_field_name') != -1) {
@@ -947,30 +941,47 @@
 					})
 				} else { // 单规格
 					data = { maindataMaterial: query, maindataMaterialSkus: (this.$refs.singeTable as any).getValue() }
+					console.log('单规格表格数据 ==> ', data.maindataMaterialSkus);
+					for (let v of data.maindataMaterialSkus) {
+						if (!v.price) return this.$message.warning('物料价格必填');
+						if (parseInt(v.price) <= 0) return this.$message.warning('物料价格不能小于1');
+						if (!v.unit) return this.$message.warning('物料单位必填');
+						if (!v.stock) return this.$message.warning('物料库存必填');
+						if (parseInt(v.stock) <= 0) return this.$message.warning('物料库存必须为自然数');
+						if (!v.shelfLife) return this.$message.warning('物料保质期必填');
+						if (parseInt(v.shelfLife) <= 0) return this.$message.warning('物料保质期必须为自然数');
+						if (!v.weight) return this.$message.warning('物料重量必填');
+						if (parseInt(v.weight) <= 0) return this.$message.warning('物料重量不能小于1');
+						if (!v.length) return this.$message.warning('物料长必填');
+						if (parseInt(v.length) <= 0) return this.$message.warning('物料长不能小于1');
+						if (!v.width) return this.$message.warning('物料宽必填');
+						if (parseInt(v.width) <= 0) return this.$message.warning('物料宽不能小于1');
+						if (!v.height) return this.$message.warning('物料高必填');
+						if (parseInt(v.height) <= 0) return this.$message.warning('物料高不能小于1');
+					};
 					data.maindataMaterialSkus[0].isDeleted = 0;
-					// data.maindataMaterialSkus[0].skuTitle = query.name;
-					// data.maindataMaterialSkus[0].skuSubtitle = query.shortName;
 					data.maindataMaterial.attributeList = ""
 				}
-				console.log('data ==> ', data);
-				if (this.isEdit) { // 编辑
-					other.updateSpuAndSku(data, 'maindataMaterial').then((res : any) => {
-						if (res.code === 200) {
-							this.isShow = 'home';
-							this.getDataList();
-							this.$message({ type: 'success', message: res.msg })
-						}
-					})
-					// 新增
-				} else {
-					other.saveSpuAndSku(data, 'maindataMaterial').then((res : any) => {
-						if (res.code === 200) {
-							this.isShow = 'home';
-							this.getDataList();
-							this.$message({ type: 'success', message: res.msg })
-						}
-					})
-				}
+				// console.log('data ==> ', data);
+				// if (this.isEdit) { // 编辑
+				// 	other.updateSpuAndSku(data, 'maindataMaterial').then((res : any) => {
+				// 		if (res.code === 200) {
+				// 			this.isShow = 'home';
+				// 			this.getDataList();
+				// 			this.$message({ type: 'success', message: res.msg })
+				// 		}
+				// 	})
+				// 	// 新增
+				// } else {
+				// 	other.saveSpuAndSku(data, 'maindataMaterial').then((res : any) => {
+				// 		if (res.code === 200) {
+				// 			this.isShow = 'home';
+				// 			this.getDataList();
+				// 			this.$message({ type: 'success', message: res.msg })
+				// 		}
+				// 	})
+				// }
+
 			});
 		}
 		// 新增
@@ -981,6 +992,7 @@
 			this.textarea = '' // 描述
 			this.tagsData = [] // 标签
 			this.attributeList = [] // 属性规格
+			this.tableList = [] // 表格数据
 			this.materialSpec = 0; // 单规格
 			this.isSingle = true; // 显示单表格
 			this.isEdit = false; // 是否编辑
@@ -994,72 +1006,93 @@
 		getDetail(e : any) {
 			console.log('编辑 ==> ', e);
 			(this as any).$refs.byTool.setTool({ return: true, save: true, delete: true })
-			this.loading = this.$loading({ target: '.my-container' })
+			this.loading = this.$loading({ target: '.my-container' });
+			api.single({ id: e.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
+				if (res.code === 200) {
+					if (res.data) e.vmCategoryName = res.data.name;
+				}
+			});
+			api.single({ id: e.organizationCategoryId }, 'maindataMaterialOrganizationCategory').then((res : any) => {
+				if (res.code === 200) {
+					if (res.data) e.organizationCategoryName = res.data.name;
+				}
+			});
 			api.single({ id: e.categoryId }, 'maindataMaterialCategory').then((res : any) => {
-				if (res.code === 200) e.categoryName = res.data.name
-			}).then(() => {
-				api.single({ id: e.vmCategoryId }, 'maindataMaterialVmcategory').then((res : any) => {
-					if (res.code === 200) e.vmCategoryName = res.data.name
-				}).then(() => {
-					api.single({ id: e.organizationCategoryId }, 'maindataMaterialOrganizationCategory').then((res : any) => {
-						if (res.code === 200) e.organizationCategoryName = res.data.name
-					}).then(() => {
-						if (e.attributeId) {
-							api.single({ id: e.attributeId }, 'maindataMaterialAttribute').then((res : any) => {
-								if (res.code === 200) {
-									if (res.data) this.selectValue = res.data.name
-								}
-							})
+				if (res.code === 200) e.categoryName = res.data.name;
+				if (e.attributeId) {
+					api.single({ id: e.attributeId }, 'maindataMaterialAttribute').then((res : any) => {
+						if (res.code === 200) {
+							if (res.data) this.selectValue = res.data.name
 						}
-						this.intercept = e.attributeId // 拦截物料属性判断
-						this.isEdit = true;
-						this.editInfo = e;
-						this.isShow = 'add';
-						// 标签
-						if (e.tags) {
-							this.tagsData = e.tags.split(",")
-						} else this.tagsData = [];
-						this.materialSpec = e.materialSpec
-						this.isSingle = e.materialSpec === 0 ? true : false;
-						if (e.attributeList) this.attributeList = JSON.parse(e.attributeList);
-						other.selectByMaterialId({ id: e.id }, 'maindataMaterialSku').then((res : any) => {
-							if (res.code === 200) {
-								if (this.isSingle) {
-									this.selectValue = '' // 物料属性名称
-									this.towTable = '' // 表格数据
-									this.attributeList = []; // 属性规格
-									(this as any).$refs.singeTable.setValue(res.data);
-								} else {
-									this.forFun(this.attributeList[0], 0) // 生成sku
-									let tableConfig = (this as any).$lodash.cloneDeep(this.tableConfig);
-									let skuRuleList = (this as any).$lodash.cloneDeep(this.skuRuleList);
-									let newColumns = (this as any).$lodash.cloneDeep(this.attributeList).reverse();
-									res.data.map((v : any, i : any) => {
-										v = Object.assign(v, skuRuleList[i])
-										v.dataIndex = i
-									})
-									newColumns.map((v : any) => {
-										tableConfig.columns.unshift({
-											width: '80px',
-											title: v.title,
-											field: v.field,
-										})
-									});
-									this.tableList = (this as any).$lodash.cloneDeep(res.data);
-									// console.log('表格配置 ==> ', tableConfig);
-									console.log('skuRuleList ==> ', skuRuleList);
-									console.log('表格数据 ==> ', this.tableList);
-									this.setTableConfig = tableConfig;
-									setTimeout(() => {
-										(this as any).$refs.table.setConfig(tableConfig); // 设置表格配置
-										(this as any).$refs.table.setValue(this.tableList) // 设置表格数据
-									}, 300)
-								}
-							}
-							(this as any).$refs.form.setValue(e)
-							this.loading.close()
-						})
 					})
+				}
+				this.intercept = e.attributeId // 拦截物料属性判断
+				this.isEdit = true;
+				this.editInfo = e;
+				this.isShow = 'add';
+				// 标签
+				if (e.tags) {
+					this.tagsData = e.tags.split(",")
+				} else this.tagsData = [];
+				this.materialSpec = e.materialSpec
+				this.isSingle = e.materialSpec === 0 ? true : false;
+				if (e.attributeList) this.attributeList = JSON.parse(e.attributeList);
+				other.selectByMaterialId({ id: e.id }, 'maindataMaterialSku').then((res : any) => {
+					if (res.code === 200) {
+						if (this.isSingle) {
+							this.selectValue = '' // 物料属性名称
+							this.towTable = '' // 表格数据
+							this.attributeList = []; // 属性规格
+							let singleTable = (this as any).$lodash.cloneDeep(this.singleTable);
+							singleTable.columns[5] = {
+								width: "80px",
+								field: "stock",
+								title: "库存"
+							};
+
+							console.log(singleTable.columns);
+							setTimeout(() => {
+								(this as any).$refs.singeTable.setConfig(singleTable); // 设置表格配置
+								(this as any).$refs.singeTable.setValue(res.data);
+							}, 0)
+						} else {
+							this.forFun(this.attributeList[0], 0) // 生成sku
+							let tableConfig = (this as any).$lodash.cloneDeep(this.tableConfig);
+							let skuRuleList = (this as any).$lodash.cloneDeep(this.skuRuleList);
+							let newColumns = (this as any).$lodash.cloneDeep(this.attributeList).reverse();
+							res.data.map((v : any, i : any) => {
+								v = Object.assign(v, skuRuleList[i])
+								v.dataIndex = i
+							});
+							newColumns.map((v : any) => {
+								tableConfig.columns.unshift({
+									width: '80px',
+									title: v.title,
+									field: v.field,
+								})
+							});
+							tableConfig.columns.map((v : any, i : any) => {
+								if (v.title == '库存') {
+									tableConfig.columns[i] = {
+										width: "80px",
+										field: "stock",
+										title: "库存"
+									}
+								}
+							});
+							this.tableList = (this as any).$lodash.cloneDeep(res.data);
+							console.log('表格配置 ==> ', tableConfig);
+							console.log('skuRuleList ==> ', skuRuleList);
+							console.log('表格数据 ==> ', this.tableList);
+							this.setTableConfig = tableConfig;
+							setTimeout(() => {
+								(this as any).$refs.table.setConfig(tableConfig); // 设置表格配置
+								(this as any).$refs.table.setValue(this.tableList) // 设置表格数据
+							}, 300)
+						}
+					}
+					(this as any).$refs.form.setValue(e)
+					this.loading.close()
 				})
 			})
 		}
@@ -1267,15 +1300,12 @@
 				});
 			});
 		}
-		// 监听单表格数据
-		getSingleValue(e : any) {
-			// console.log('监听单表格 ==> ', e);
-			e.volume = (e.length * e.width * e.height).toFixed(2);
-		}
 		// 监听表格数据
 		getInputValue(e : any) {
 			// console.log('监听表格 ==> ', e);
-			e.volume = (e.length * e.width * e.height).toFixed(2);
+			if (e.length && e.width && e.height) {
+				e.volume = (e.length * e.width * e.height).toFixed(2);
+			}
 		}
 		// 排序生成
 		forFun(data : any, i : number, v ?: any) {
@@ -1408,19 +1438,6 @@
 				} else this.failHandle(res)
 			})
 		}
-		// 获取树型导航数据
-		getTreeList() {
-			api.treeList('maindataMaterialCategory').then((res : any) => {
-				// console.log(res.data[0]);
-				if (res.code === 200) {
-					this.data = res.data;
-					this.expandedKeys.push(res.data[0].id)
-					res.data[0].children.map((v : any) => {
-						this.expandedKeys.push(v.id)
-					})
-				} else this.failHandle(res)
-			})
-		}
 		// 获取列表数据
 		getDataList() {
 			if (!this.$refs.moduleView) {
@@ -1618,6 +1635,7 @@
 			padding-right: 16px;
 			flex-shrink: 0;
 			height: 740px;
+
 			// box-sizing: border-box;
 			.bill-tab {
 				width: 150px;

+ 3 - 2
src/views/audit/saleOrder/index.vue

@@ -327,7 +327,7 @@
 								{
 									width: 150,
 									title: '已交付数量',
-									field: 'deliveryNumber',
+									field: 'outNumber',
 								},
 								{
 									width: 150,
@@ -609,6 +609,7 @@
 		// 引单
 		citationOrder() {
 			let data : any = (this as any).$refs.bill.getSourceTableSelectData(0);
+			console.log(data);
 			if (data.length <= 0) return this.$message.warning('请选择引单数据');
 			data = data.map((item : any) => {
 				item.address = item.deliveryAddress
@@ -622,7 +623,7 @@
 			billConfig.tool.tools = { order: true };
 			billConfig.tool.customTools = [];
 			this.isCitation = true;
-			(this.$refs.bill as any).showTab = 'bill';
+			// (this.$refs.bill as any).showTab = 'bill';
 			setTimeout(() => {
 				(this.$refs.bill as any).setBillConfig(billConfig);
 				(this.$refs.bill as any).setBillFormValue(data[0]); // 设置单据表单数据

+ 41 - 3
src/views/audit/supplier/index.vue

@@ -1,5 +1,11 @@
 <template>
 	<div class="my-container">
+		<div class="bill-left">
+			<div class="bill-tab">
+				<div class="tab-title">导航</div>
+				<side-tree :propConfig="treeConfig" @onChange="onChangeTree" />
+			</div>
+		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
 				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
@@ -33,6 +39,22 @@
 		popTitle : any = ''
 		radio : any = 0
 		dialogFormVisible : boolean = false
+		parentId: any = '';
+		treeConfig = {
+			attr: {
+				retConfig: {
+					id: 'id',
+					name: 'name'
+				},
+				defaultExpandAll: true,
+				label: 'name',
+				resType: 'data'
+			},
+			request: {
+				url: '/maindata/maindataMaterialCategory/treeList',
+				method: 'GET'
+			}
+		}
 		config : any = {
 			search: {
 				attr: {
@@ -108,7 +130,7 @@
 					field: 'name',
 					isDetail: true,
 					width: 300,
-				}, 
+				},
 				{
 					title: '负责人',
 					field: 'contacts',
@@ -192,7 +214,7 @@
 							attr: {
 								size: 'mini',
 								placeholder: '请输入备注',
-								type:'textarea'
+								type: 'textarea'
 							},
 						}
 					},
@@ -204,6 +226,22 @@
 				this.getDataList()
 			}, 300)
 		}
+		//点击树获取数据
+		onChangeTree(e : any) {
+			console.log('点击结果:', e)
+			this.parentId = e.id[0]
+			api.childrenTreeList({ id: e.id[0], pageNo: 1, pageSize: 999 }, 'maindataMaterialSupplier').then((res : any) => {
+				if (res.code === 200) {
+					(this.$refs.moduleView as any).setTableValue(res.data);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView as any).setPage(page)
+				}
+			})
+		}
 		// 确认新增/编辑
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
@@ -332,7 +370,7 @@
 			});
 		}
 		// 刷新
-		onRefresh(){
+		onRefresh() {
 			this.loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
 			api.pageList({}, 'maindataMaterialSupplier').then((res : any) => {

+ 20 - 44
src/views/audit/virtually/index.vue

@@ -3,21 +3,20 @@
 		<div class="bill-left">
 			<div class="bill-tab">
 				<div class="tab-title">导航</div>
-				<!-- 				<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props" @node-click="handleNodeClick"></el-tree> -->
 				<side-tree :propConfig="treeConfig" @onChange="onChangeTree" />
 			</div>
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
+				@resert="onRefresh" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
 		<el-dialog :title="popTitle+'虚拟分类'" :visible.sync="dialogFormVisible" width="30%">
 			<by-form :propConfig="addConfig" ref="addFormId">
 				<template v-slot:status class="clearfix">
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="0">正常</el-radio>
-					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">禁用</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="1">正常</el-radio>
+					<el-radio class="fl" style="margin-top: 8px;" v-model="radio" :label="2">禁用</el-radio>
 				</template>
 			</by-form>
 			<div slot="footer" class="dialog-footer">
@@ -33,7 +32,6 @@
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	export default class Virtually extends Vue {
-		loading : any = null
 		// 左边
 		data : any = []
 		expandedKeys : any = []
@@ -47,7 +45,7 @@
 		timeNum = 0;
 		timer : any = null
 		popTitle : any = ''
-		radio : any = 0
+		radio : any = 1
 		dialogFormVisible : boolean = false
 		treeConfig = {
 			attr: {
@@ -107,10 +105,10 @@
 								placeholder: '请选择数据',
 								clearable: true,
 								data: [{
-									value: 0,
+									value: 1,
 									label: '正常'
 								}, {
-									value: 1,
+									value: 2,
 									label: '禁用'
 								}]
 							}
@@ -243,7 +241,6 @@
 			]
 		}
 		mounted() {
-			// this.getTreeList()
 			this.timer = setInterval(() => {
 				this.getDataList()
 			}, 500)
@@ -263,19 +260,6 @@
 				}
 			})
 		}
-		// 获取树型导航数据
-		getTreeList() {
-			api.treeList('maindataMaterialVmcategory').then((res : any) => {
-				// console.log(res.data[0]);
-				if (res.code === 200) {
-					this.data = res.data;
-					this.expandedKeys.push(res.data[0].id)
-					res.data[0].children.map((v : any) => {
-						this.expandedKeys.push(v.id)
-					})
-				} else this.failHandle(res)
-			})
-		}
 		// 确认新增/编辑
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
@@ -290,7 +274,6 @@
 								type: 'success',
 								message: this.popTitle + '成功!'
 							});
-							this.getTreeList();
 							this.getDataList();
 						} else this.failHandle(res)
 					})
@@ -301,7 +284,6 @@
 								type: 'success',
 								message: this.popTitle + '成功!'
 							});
-							this.getTreeList();
 							this.getDataList();
 						} else this.failHandle(res)
 					})
@@ -319,7 +301,7 @@
 			}
 			clearInterval(this.timer)
 			let query = (this.$refs.moduleView as any).getQuery();
-			query.parentId = this.parentId;
+			if (this.parentId) query.parentId = this.parentId;
 			let newData : any = {}
 			for (let key in query) {
 				if (query[key].toString()) {
@@ -327,7 +309,10 @@
 				}
 			}
 			console.log('表单字段 ==> ', newData);
-			api.pageList(newData, 'maindataMaterialVmcategory').then((res : any) => {
+			this.getPageList(newData)
+		}
+		getPageList(query : any) {
+			api.pageList(query, 'maindataMaterialVmcategory').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.moduleView as any).setTableValue(res.data.records);
 					let page = {
@@ -335,7 +320,7 @@
 						pageSize: res.data.size, //每页条数
 						total: res.data.total //总条数
 					};
-					(this.$refs.moduleView as any).setPage(page)
+					(this.$refs.moduleView as any).setPage(page);
 				} else this.failHandle(res)
 			})
 		}
@@ -349,13 +334,14 @@
 		onAdd() {
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
-			this.radio = 0
+			this.radio = 1
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue({});
 			}, 0)
 		}
 		// 打开编辑
 		openEdit(e : any) {
+			console.log(e);
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
 			this.radio = e.status
@@ -386,7 +372,6 @@
 			}).then(() => {
 				api.deleteList({ ids: ids }, 'maindataMaterialVmcategory').then((res : any) => {
 					if (res.code === 200) {
-						this.getTreeList();
 						this.getDataList();
 						this.$message({
 							type: 'success',
@@ -414,7 +399,6 @@
 						if (v.data.length > 0) return this.$message({ type: 'error', message: '此数据有子节点,不能进行删除!' })
 						api.deleteList({ ids: item.id }, 'maindataMaterialVmcategory').then((res : any) => {
 							if (res.code === 200) {
-								this.getTreeList();
 								this.getDataList();
 								this.$message({
 									type: 'success',
@@ -431,22 +415,13 @@
 				});
 			});
 		}
-		// 刷新
+		// 刷新/重置
 		onRefresh() {
-			this.loading = this.$loading({ target: '.main-container' });
+			let loading = this.$loading({ target: '.main-container' });
 			(this as any).$refs.moduleView.clearSearch();
-			api.pageList({}, 'maindataMaterialVmcategory').then((res : any) => {
-				if (res.code === 200) {
-					(this.$refs.moduleView as any).setTableValue(res.data.records);
-					let page = {
-						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
-						total: res.data.total //总条数
-					};
-					(this.$refs.moduleView as any).setPage(page);
-					this.loading.close();
-				} else this.$message.error(res.msg);
-			})
+			this.parentId = '';
+			this.getPageList({});
+			loading.close();
 		}
 		//导出
 		onExport() {
@@ -484,6 +459,7 @@
 			padding-right: 16px;
 			flex-shrink: 0;
 			height: 740px;
+
 			// box-sizing: border-box;
 			.bill-tab {
 				width: 150px;

+ 2 - 2
src/views/audit/warehousing/components/towInOne.vue

@@ -93,14 +93,14 @@
 		// 确定仓库仓位
 		doConfirm() {
 			let data : any = (this as any).$refs.form.getValue();
-			// console.log(data);
+			console.log('data',data);
 			// console.log(this.parentValue);
 			if (!data.storehouseId || !data.storingLocationId) return this.$message.warning('仓库仓位为必填项');
 			data.towInOne = data.storehouseName + ',' + data.storingLocationName;
 			if (this.parentValue.materialSku) {
 				let loading = this.$loading({ target: '.main-container' });
 				api.getInventoryByStoridAndSkuid({
-					storidId: data.storehouseId,
+					storidId: data.storingLocationId,
 					skuid: this.parentValue.materialSku,
 				}).then((res : any) => {
 					if (res.code === 200) {

+ 14 - 17
src/views/audit/warehousing/index.vue

@@ -686,6 +686,7 @@
 		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
+			console.log('监听表格数据变化');
 			this.isChange = true;
 			this.isSubmit = false;
 			e.totalPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
@@ -962,14 +963,12 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
-				if (this.tabType === 'smt') {
-					api.cancelSubmission({ id: e.id }, 'supplyEntryOrder').then((res : any) => {
-						if (res.code === 200) {
-							this.$message.success('反提交成功');
-							this.clickTab(this.tabType);
-						} else this.$message.error(res.msg)
-					})
-				}
+				api.cancelSubmission({ id: e.id }, 'supplyEntryOrder').then((res : any) => {
+					if (res.code === 200) {
+						this.$message.success('反提交成功');
+						this.clickTab(this.tabType);
+					} else this.$message.error(res.msg)
+				})
 			}).catch(() => this.$message.info('已取消反提交'));
 		}
 		// 工具栏反提交
@@ -981,15 +980,13 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
-				if (this.tabType === 'smt') {
-					api.cancelSubmission({ id: this.baseInfo.id }, 'supplyEntryOrder').then((res : any) => {
-						if (res.code === 200) {
-							this.$message.success('反提交成功');
-							this.clickTab(this.tabType);
-							(this.$refs.bill as any).showTab = 'smt';
-						} else this.$message.error(res.msg)
-					})
-				}
+				api.cancelSubmission({ id: this.baseInfo.id }, 'supplyEntryOrder').then((res : any) => {
+					if (res.code === 200) {
+						this.$message.success('反提交成功');
+						this.clickTab(this.tabType);
+						(this.$refs.bill as any).showTab = 'smt';
+					} else this.$message.error(res.msg)
+				})
 			}).catch(() => this.$message.info('已取消反提交'));
 		}
 		// 切换tab栏