AlanWong 2 년 전
부모
커밋
bcc1cd26b4

+ 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">

+ 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: '取消',

+ 73 - 50
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,10 +784,11 @@
 		}
 		// 引单
 		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) => {
+			let parentData : any = (this as any).$refs.bill.getSourceTableSelectData(0);
+			console.log(parentData);
+			if (parentData.length <= 0) return this.$message.warning('请选择引单数据');
+			parentData = parentData.map((item : any, i : any) => {
+				item.dataIndex = i;
 				item.receiveAddress = item.address
 				item.receive = item.consignee
 				item.receivePhone = item.phone
@@ -790,14 +796,19 @@
 				return newData
 			})
 			let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
-			// billConfig.tool.tools = { save: true, smt: true };
-			// this.isAdd = true;
+			parentData[0].suborderList.map((v : any) => {
+				// v.outNumber = v.outNumber ? v.outNumber : 0;
+				v.deliveryNumber = v.number - v.outNumber;
+			});
+			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';
 			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张单据表格数据
+				(this.$refs.bill as any).setBillFormValue(parentData[0]); // 设置单据表单数据
+				(this.$refs.bill as any).setBillTableValue(parentData[0].suborderList, 0);// 设置第1张单据表格数据
 			}, 0)
 		}
 		// 获取机构数据
@@ -852,8 +863,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 +927,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 +948,36 @@
 						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);
+							console.log(this.tabType);
 							v.dataIndex = i;
 							v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
-							//  查库存
-							api.getInventoryByStoridAndSkuid({
+							array.push({
 								storidId: v.storehouseId,
 								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('data', data);
+						//  查库存
+						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 +995,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({
+				array.push({
 					storidId: v.storehouseId,
 					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() {

+ 73 - 100
src/views/audit/productManagement/index.vue

@@ -216,7 +216,7 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 20
+							defaultValue: 0
 						},
 					}
 				},
@@ -229,7 +229,6 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							defaultValue: '袋'
 						},
 					}
 				},
@@ -243,7 +242,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -257,7 +255,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -271,7 +268,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 5
 						},
 					}
 				},
@@ -285,7 +281,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 5
 						},
 					}
 				},
@@ -299,7 +294,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 18
 						},
 					}
 				},
@@ -313,7 +307,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 6
 						},
 					}
 				},
@@ -377,7 +370,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 20
 						},
 					}
 				},
@@ -390,7 +382,6 @@
 						attr: {
 							size: 'mini',
 							placeholder: ' ',
-							defaultValue: '袋'
 						},
 					}
 				},
@@ -404,7 +395,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -418,7 +408,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 100
 						},
 					}
 				},
@@ -432,7 +421,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 500
 						},
 					}
 				},
@@ -446,7 +434,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 28
 						},
 					}
 				},
@@ -460,7 +447,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 18
 						},
 					}
 				},
@@ -474,7 +460,6 @@
 							size: 'mini',
 							placeholder: ' ',
 							type: "number",
-							defaultValue: 6
 						},
 					}
 				},
@@ -513,12 +498,12 @@
 					categoryName: [{
 						required: true, message: '请输入物料分类', trigger: 'change'
 					}],
-					vmCategoryName: [{
-						required: true, message: '请输入虚拟分类', trigger: 'change'
-					}],
-					organizationCategoryName: [{
-						required: true, message: '请输入机构商品分类', trigger: 'change'
-					}],
+					// vmCategoryName: [{
+					// 	required: true, message: '请输入虚拟分类', trigger: 'change'
+					// }],
+					// organizationCategoryName: [{
+					// 	required: true, message: '请输入机构商品分类', trigger: 'change'
+					// }],
 				}
 			},
 			columns: [
@@ -663,7 +648,7 @@
 						}
 					},
 					{
-						labelWidth:'116px',
+						labelWidth: '116px',
 						span: 6,
 						label: '机构商品分类',
 						prop: 'organizationCategoryName',
@@ -886,7 +871,6 @@
 			},
 		}
 		mounted() {
-			// this.getTreeList()
 			this.getAttribute()
 			this.timer = setInterval(() => {
 				this.getDataList()
@@ -994,72 +978,73 @@
 		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 = []; // 属性规格
+							(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()
 				})
 			})
 		}
@@ -1408,19 +1393,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 +1590,7 @@
 			padding-right: 16px;
 			flex-shrink: 0;
 			height: 740px;
+
 			// box-sizing: border-box;
 			.bill-tab {
 				width: 150px;

+ 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栏