Explorar el Código

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

ymy hace 2 años
padre
commit
f2989fbab0

+ 1 - 1
src/api/order.ts

@@ -63,7 +63,7 @@ function splitOrder(data : any, url : any) {
 	return request({
 		url: '/supply/' + url + '/splitOrder',
 		method: 'POST',
-		params: data
+		data: data
 	})
 }
 // 退单

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

@@ -2,7 +2,7 @@
   <div class="bill">
     <div class="bill-left">
       <div class="bill-tab" :style="{width:closeTab?0:'200px'}">
-        <div class="title">导航</div>
+        <div class="bill-title">导航</div>
         <div class="bill-nav" v-if="sourceConfig" :class="{'onBill':showTab == 'source'}" @click="tabChange('source')">引单</div>
         <div class="bill-nav" v-if="billConfig" :class="{'onBill':showTab == 'bill'}" @click="tabChange('bill')">单据</div>
         <div class="bill-nav" v-if="smtConfig" :class="{'onBill':showTab == 'smt'}" @click="tabChange('smt')">已提交</div>
@@ -385,7 +385,7 @@ export default class ByBill extends VueViews {
       transition: all .5s;
       overflow: hidden;
     }
-    .title{
+    .bill-title{
       font-size: 16px;
       padding-bottom: 16px;
       width: 200px;

+ 120 - 66
src/views/audit/depots/index.vue

@@ -15,13 +15,14 @@
 				</el-dialog>
 			</div>
 			<div class="bill-main" v-show="isShow==='cwb'" key="item2">
-				<module-view :propConfig="config2" ref="moduleView2" @clickHandle="clickHandle2" @detail="openEdit2">
+				<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="请选择所属机构名称" v-model="value.organizationName" class="input-organizationName"
+							<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>
@@ -45,6 +46,8 @@
 		isShow : any = 'ckb'
 		timeNum = 0;
 		timer : any = null
+		timeNum2 = 0;
+		timer2 : any = null
 		popTitle : any = ''
 		tableData : any = {}
 		dialogFormVisible : boolean = false
@@ -57,7 +60,7 @@
 				columns: [
 					[{
 						span: 6,
-						label: '名称',
+						label: '仓库名称',
 						prop: 'name',
 						component: 'by-input',
 						labelWidth: '70px',
@@ -86,8 +89,6 @@
 			tool: {
 				tools: {
 					add: true,
-					// export: true,
-					delete: true,
 					search: true,
 					refresh: true
 				}
@@ -231,7 +232,6 @@
 				tools: {
 					return: true,
 					add: true,
-					// export: true,
 					delete: true,
 					search: true,
 					refresh: true
@@ -247,26 +247,37 @@
 				},
 				columns: [{
 					width: 300,
-					title: '名称',
+					title: '仓位名称',
 					field: 'name',
 					isDetail: true,
-				}, {
+				},
+				{
+					width: 250,
+					title: '仓库名称',
+					field: 'ckName',
+				},
+				{
+					width: 200,
 					title: '所属机构名称',
 					field: 'organizationName',
 				},
 				{
+					width: 150,
 					title: '库存',
 					field: 'stock'
 				},
 				{
+					width: 150,
 					title: '库存体积',
 					field: 'stockVolume'
 				},
 				{
+					width: 150,
 					title: '库存数量上限',
 					field: 'maxStockNumber'
 				},
 				{
+					width: 150,
 					title: '库存体积上限',
 					field: 'maxStockVolume'
 				}, {
@@ -285,7 +296,7 @@
 					}, {
 						name: '删除',
 						event: {
-							click: (item : any) => (this as any).doDelete2(item, 'maindataStorehouse')
+							click: (item : any) => (this as any).doDelete3(item, 'maindataStoringLocation')
 						}
 					}]
 				}]
@@ -387,32 +398,11 @@
 				this.getDataList()
 			}, 500)
 		}
-		// 打开机构选择
-		handleSupplier() {
-			(this.$refs.supplierModal as any).setShow(true);
-		}
-		// 确定机构选择
-		confirmSupplier(e : any) {
-			if (e.length == 0) return this.$message.warning('请选择供应商!');
-			let value : any = (this.$refs.addFormId2 as any).getValue();
-			value.organizationName = e[0].name;
-			value.organizationId = e[0].id;
-			(this.$refs.addFormId2 as any).setValue(value);
-		}
-		// 查看仓位
-		changeTab(item : any) {
-			this.tableData = item;
-			this.tableData.subList.map((v : any, i : any) => {
-				v.dataIndex = i;
-			});
-			console.log('仓位表数据 ==> ', this.tableData);
-			(this.$refs.moduleView2 as any).setTableValue(this.tableData.subList);
-			this.isShow = 'cwb';
-		}
 		// 仓库确认新增/编辑
 		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 === '新增') {
 					api.saveList(query, 'maindataStorehouse').then((res : any) => {
@@ -435,31 +425,25 @@
 		confirm2() {
 			(this as any).$refs.addFormId2.validate().then(() => {
 				let query = (this as any).$refs.addFormId2.getValue();
-				this.tableData.subList = [query];
-				let addId = this.tableData.id;
-				this.tableData.subList.map((v : any) => {
-					v.storehouseId = this.tableData.id;
-					v.idDelete = 0;
-				})
+				console.log('表单参数 ==> ', query);
+				query.storehouseId = this.tableData.id;
+				query.idDelete = 0;
 				this.dialogFormVisible2 = false;
 				if (this.popTitle === '新增') {
-					delete this.tableData.id;
-					console.log(this.tableData);
-					api.saveList(this.tableData, 'maindataStorehouse').then((res : any) => {
+					api.saveList(query, 'maindataStoringLocation').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success(this.popTitle + '成功!');
-							this.getOneself(addId);
+							this.getOneself(query.storehouseId);
 						} else this.$message.error(res.msg)
 					})
 				} else if (this.popTitle === '编辑') {
-					api.updateList(this.tableData, 'maindataStorehouse').then((res : any) => {
+					api.updateList(query, 'maindataStoringLocation').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success(this.popTitle + '成功!');
-							this.getOneself(this.tableData.id);
+							this.getOneself(query.storehouseId);
 						} else this.$message.error(res.msg)
 					})
 				}
-
 			})
 		}
 		// 通过id拿到当条数据
@@ -467,8 +451,8 @@
 			api.single({ id: e }, 'maindataStorehouse').then((res : any) => {
 				if (res.code === 200) {
 					this.tableData = res.data;
-					this.tableData.subList.map((v : any, i : any) => {
-						v.dataIndex = i
+					this.tableData.subList.map((v:any) => {
+						v.ckName = this.tableData.name;
 					});
 					(this.$refs.moduleView2 as any).setTableValue(this.tableData.subList);
 				}
@@ -497,16 +481,42 @@
 				} else this.$message.error(res.msg)
 			})
 		}
+		// 获取仓位列表数据
+		getDataList2() {
+			if (!this.$refs.moduleView2) {
+				if (this.timeNum2 > 5) {
+					clearInterval(this.timer2)
+				}
+				this.timeNum2++;
+				return
+			}
+			clearInterval(this.timer2)
+			let query = (this.$refs.moduleView2 as any).getQuery();
+			console.log(query);
+			query.storehouseId = this.tableData.id;
+			api.pageList(query, 'maindataStoringLocation').then((res : any) => {
+				if (res.code === 200) {
+					res.data.records.map((v:any) => {
+						v.ckName = this.tableData.name;
+					});
+					(this.$refs.moduleView2 as any).setTableValue(res.data.records);
+					let page = {
+						pageNo: res.data.current, //当前页
+						pageSize: res.data.size, //每页条数
+						total: res.data.total //总条数
+					};
+					(this.$refs.moduleView2 as any).setPage(page)
+				} else this.$message.error(res.msg)
+			})
+		}
 		// 工具栏方法
 		clickHandle(e : any) {
 			if (e === 'onAdd') this.onAdd();
-			if (e === 'onDelete') this.onDelete('moduleView', 'maindataStorehouse');
-			if (e === 'onExport') this.onExport();
 		}
 		// 工具栏方法
 		clickHandle2(e : any) {
 			if (e === 'onAdd') this.onAdd2();
-			if (e === 'onExport') this.onExport();
+			if (e === 'onDelete') this.onDelete('moduleView2', 'maindataStoringLocation');
 			if (e === 'onReturn') this.isShow = 'ckb';
 		}
 		// 打开新增
@@ -541,11 +551,59 @@
 				if ((this as any).$refs.addFormId2) (this as any).$refs.addFormId2.setValue(e);
 			}, 0)
 		}
-		// 刷新
-		onRefresh(){
+		// 打开机构选择
+		handleSupplier() {
+			(this.$refs.supplierModal as any).setShow(true);
+		}
+		// 确定机构选择
+		confirmSupplier(e : any) {
+			if (e.length == 0) return this.$message.warning('请选择供应商!');
+			let value : any = (this.$refs.addFormId2 as any).getValue();
+			value.organizationName = e[0].name;
+			value.organizationId = e[0].id;
+			(this.$refs.addFormId2 as any).setValue(value);
+		}
+		// 查看仓位
+		changeTab(item : any) {
+			this.tableData = item;
+			this.tableData.subList.map((v:any) => {
+				v.ckName = this.tableData.name;
+			})
+			console.log('仓库表数据 ==> ', this.tableData);
+			(this.$refs.moduleView2 as any).setTableValue(this.tableData.subList);
+			this.isShow = 'cwb';
+		}
+		// 刷新仓库
+		onRefresh() {
 			(this as any).$refs.moduleView.clearSearch();
+			this.getDataList();
+		}
+		// 刷新仓位
+		onRefresh2() {
+			(this as any).$refs.moduleView2.clearSearch();
+			this.getDataList2();
+		}
+		// 仓库操作删除
+		doDelete2(item : any, url : any) {
+			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+				center: true
+			}).then(() => {
+				if (item.subList.length > 0) {
+					this.$message.warning('此仓库下有仓位,不可删除!');
+				} else {
+					api.deleteList({ ids: item.id }, url).then((res : any) => {
+						if (res.code === 200) {
+							this.getDataList();
+							this.$message.success('删除成功');
+						} else this.$message.error(res.msg)
+					})
+				}
+			}).catch(() => this.$message.info('已取消删除'));
 		}
-		// 工具栏删除
+		// 仓位工具栏删除
 		onDelete(moduleView : any, url : any) {
 			let selectData = (this.$refs[moduleView] as any).getSelectData()
 			let ids = '';
@@ -563,31 +621,27 @@
 			}).then(() => {
 				api.deleteList({ ids: ids }, url).then((res : any) => {
 					if (res.code === 200) {
-						this.getDataList();
+						this.getDataList2();
 						this.$message.success('删除成功');
 					} else this.$message.error(res.msg)
 				})
 			}).catch(() => this.$message.info('已取消删除'));
 		}
-		// 操作删除
-		doDelete2(item : any, url : any) {
+		// 仓位操作删除
+		doDelete3(item : any, url : any) {
+			console.log('仓位操作删除:',item,url);
 			this.$confirm('确定删除吗,此操作不能撤销!', '注意', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				type: 'warning',
 				center: true
 			}).then(() => {
-				console.log(item);
-				if (item.subList) {
-					api.deleteList({ ids: item.id }, url).then((res : any) => {
-						if (res.code === 200) {
-							this.getDataList();
-							this.$message.success('删除成功');
-						} else this.$message.error(res.msg)
-					})
-				} else {
-
-				}
+				api.deleteList({ ids: item.id }, url).then((res : any) => {
+					if (res.code === 200) {
+						this.getDataList2();
+						this.$message.success('删除成功');
+					} else this.$message.error(res.msg)
+				})
 			}).catch(() => this.$message.info('已取消删除'));
 		}
 		//导出

+ 10 - 2
src/views/audit/orderTask/components/focus.vue

@@ -1,6 +1,7 @@
 <template>
 	<div>
-		<el-input placeholder="请选择供应商" v-model="propValue" class="input-organizationName" clearable :readonly="true">
+		<el-input placeholder="请选择供应商" v-model="value" class="input-organizationName" size="small" clearable
+			:readonly="true">
 			<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
 		</el-input>
 		<!-- 选择机构名称 -->
@@ -13,12 +14,19 @@
 	@Component
 	export default class Focus extends Vue {
 		@Prop()
-		propValue : any
+		propValue : any;
+		value : any = '';
+		@Watch('propValue')
+		propValueChange(v : any) {
+			this.value = v;
+		}
+
 		handleSupplier() {
 			(this.$refs.supplierModal as any).setShow(true);
 		}
 		// 确定机构名称
 		confirm(e : any) {
+			this.value = e[0].name;
 			this.$emit('getSupplierModal', e[0])
 		}
 	}

+ 10 - 4
src/views/audit/orderTask/index.vue

@@ -43,9 +43,9 @@
 						size: 'small',
 						readonly: false,
 						rules: {
-							orderNumber: [{
-								required: true, message: '请输入单据编号', trigger: 'blur'
-							}]
+							// orderNumber: [{
+							// 	required: true, message: '请输入单据编号', trigger: 'blur'
+							// }]
 						}
 					},
 					columns: [
@@ -55,6 +55,11 @@
 								label: '单据编号',
 								prop: 'orderNumber',
 								component: 'by-input',
+								compConfig: {
+									attr: {
+										readonly: true
+									},
+								}
 							},
 							{
 								span: 8,
@@ -799,6 +804,7 @@
 		}
 		// 获取机构数据
 		getSupplierModal(e : any) {
+			console.log('获取机构数据 ==> ',e);
 			this.supplierInfo = e;
 		}
 		// 监听表格数据变化
@@ -808,7 +814,7 @@
 		}
 		// 确定商品新增
 		confirmProduct(e : any) {
-			let contents : any = [], goodsData = e, newArr : any = [],obj:any={};
+			let contents : any = [], goodsData = e, newArr : any = [], obj : any = {};
 			goodsData = goodsData.map((item : any) => {
 				item.materialName = item.skuTitle
 				item.prePrice = 0

+ 7 - 3
src/views/audit/outbound/index.vue

@@ -12,8 +12,8 @@
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/order";
-	import productModal from "./components/productModal.vue";
-	import Focus from "./components/focus.vue";
+	import productModal from "../orderTask/components/productModal.vue";
+	import Focus from "../orderTask/components/focus.vue";
 	@Component({ components: { productModal } })
 	export default class OrderTask extends Vue {
 		// 左边
@@ -54,6 +54,11 @@
 								label: '单据编号',
 								prop: 'outOrderNo',
 								component: 'by-input',
+								compConfig: {
+									attr: {
+										readonly:true
+									},
+								}
 							},
 							{
 								span: 8,
@@ -83,7 +88,6 @@
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										size: 'mini',
 										placeholder: '请输入备注',
 										type: 'textarea'
 									},

+ 2 - 1
src/views/audit/productClassification/index.vue

@@ -53,7 +53,8 @@
 		treeConfig={
 			attr:{
 				retConfig:{
-					id:'id'
+					id:'id',
+					name:'name'
 				},
 				defaultExpandAll:true,
 				label: 'name',

+ 5 - 4
src/views/audit/productManagement/index.vue

@@ -3,7 +3,7 @@
 		<transition-group name="fade" style="position: relative;width: 100%;display: flex;">
 			<div class="bill-left" v-show="isShow==='home'" key="item">
 				<div class="bill-tab">
-					<div class="title">导航</div>
+					<div class="bill-title">导航</div>
 					<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props"
 						@node-click="handleNodeClick"></el-tree>
 				</div>
@@ -1276,8 +1276,9 @@
 		}
 		// 添加标签
 		getTagsValue() {
-			// console.log( this.tagsData.push('1'));
-			this.tagsData.push((this as any).$refs.tagsValue.getValue());
+			let value = (this as any).$refs.tagsValue.getValue().trim();
+			if (!value) return this.$message.warning('请输入标签值');
+			this.tagsData.push(value);
 			(this as any).$refs.tagsValue.clearValue();
 		}
 		// 删除标签
@@ -1610,7 +1611,7 @@
 				overflow: hidden;
 			}
 
-			.title {
+			.bill-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;

+ 2 - 2
src/views/audit/saleOrder/components/byBill/byBill.vue

@@ -2,7 +2,7 @@
   <div class="bill">
     <div class="bill-left">
       <div class="bill-tab" :style="{width:closeTab?0:'200px'}">
-        <div class="title">导航</div>
+        <div class="bill-title">导航</div>
         <div class="bill-nav" v-if="sourceConfig" :class="{'onBill':showTab == 'source'}" @click="tabChange('source')">引单</div>
         <div class="bill-nav" v-if="billConfig" :class="{'onBill':showTab == 'bill'}" @click="tabChange('bill')">单据</div>
         <div class="bill-nav" v-if="smtConfig" :class="{'onBill':showTab == 'smt'}" @click="tabChange('smt')">已提交</div>
@@ -395,7 +395,7 @@ export default class ByBill extends VueViews {
       transition: all .5s;
       overflow: hidden;
     }
-    .title{
+    .bill-title{
       font-size: 16px;
       padding-bottom: 16px;
       width: 200px;

+ 63 - 28
src/views/audit/saleOrder/index.vue

@@ -4,7 +4,7 @@
 			@onRefresh="onRefresh" @pagination="pagination" @clickTab="clickTab">
 		</byBill>
 		<vxe-modal v-model="vxeValue" width="70%" height="70%" min-width="800" min-height="600" show-zoom resize transfer
-			show-footer @confirm="confirm">
+			show-footer>
 			<template #title>
 				<!-- <span>拆单</span> -->
 			</template>
@@ -20,6 +20,11 @@
 					<by-table ref="rightTable" :propConfig="rightTableConfig" @onChangeRow="rightChange"></by-table>
 				</div>
 			</template>
+			<template #footer>
+				<div class="btn">
+					<el-button type="primary" size="small" @click="doConfirm">确定</el-button>
+				</div>
+			</template>
 		</vxe-modal>
 	</div>
 </template>
@@ -33,6 +38,7 @@
 		vxeValue = false
 		timeNum = 0;
 		timer : any = null
+		baseInfo : any = {} // 订单数据
 		regularData : any = [] // 固定值
 		leftTableConfig : any = {
 			attr: {
@@ -43,18 +49,22 @@
 			columns:
 				[
 					{
+						width: 128,
 						title: '物料名称',
 						field: 'materialName',
 					},
 					{
+						width: 128,
 						title: '数量',
 						field: 'number',
 					},
 					{
+						width: 128,
 						title: '已拆单数量',
 						field: 'splitOrderNumber',
 					},
 					{
+						width: 128,
 						title: '可拆单数量',
 						field: 'splitNumber',
 					}
@@ -69,10 +79,12 @@
 			columns:
 				[
 					{
+						width: 258,
 						title: '物料名称',
 						field: 'materialName',
 					},
 					{
+						width: 258,
 						title: '数量',
 						field: 'number',
 						component: 'by-input',
@@ -351,6 +363,9 @@
 							}, {
 								name: '拆单',
 								event: {
+									show: (item : any) => {
+										return item.isMaster === 1
+									},
 									click: (item : any) => (this as any).orderTaking(item)
 								}
 							}]
@@ -492,7 +507,7 @@
 		}
 		// 工具栏退单
 		doBackOrder() {
-			console.log((this as any).$refs.bill.getTableSelectData('all'));
+			// console.log((this as any).$refs.bill.getTableSelectData('all'));
 			let selectData = (this as any).$refs.bill.getTableSelectData('all');
 			let ids = '';
 			if (selectData.length > 0) {
@@ -517,6 +532,7 @@
 		}
 		// 右拆单数据变化
 		rightChange(e : any) {
+			console.log(e.number);
 			if (e.number && 0 <= e.number && e.number <= this.regularData[e.dataIndex].splitNumber) {
 				let leftTableData = (this.$refs.leftTable as any).getValue();
 				leftTableData[e.dataIndex].splitNumber = leftTableData[e.dataIndex].number - e.number;
@@ -534,6 +550,7 @@
 		// 打开拆单
 		orderTaking(item : any) {
 			this.vxeValue = true;
+			this.baseInfo = item;
 			this.regularData = (this as any).$lodash.cloneDeep(item.suborderList);
 			let rightData = (this as any).$lodash.cloneDeep(item.suborderList);
 			this.regularData.map((v : any) => {
@@ -550,23 +567,29 @@
 			}, 0)
 		}
 		// 确认拆单
-		confirm() {
-			let leftTableData = (this.$refs.leftTable as any).getValue();
+		doConfirm() {
+			let rifhtNewData : any = [];
 			let rifhtTableData = (this.$refs.rightTable as any).getValue();
-			let checkNumber : any = []
-			console.log(leftTableData);
-			console.log(rifhtTableData);
 			rifhtTableData.map((v : any) => {
-				checkNumber.push(v.number);
+				rifhtNewData.push({
+					id: v.id,
+					inSplitOrderNumber: v.number
+				})
 			});
-			console.log(checkNumber.indexOf('0'));
-			// api.splitOrder(leftTableData, 'supplyPurchaseOrder').then((res : any) => {
-			// 	if (res.code === 200) {
-			// 		this.$message.success('拆单成功!');
-			// 		this.getPageList({ pageSize: 20, pageNo: 1 }, 'all'); // 综合数据
-			// 	} else this.$message.error(res.msg);
-			// })
-			// this.$message.warning('请输入拆单销售数据')
+			let isTrue = rifhtNewData.filter((v : any) => v.inSplitOrderNumber != 0);
+			let obj : any = {
+				id: this.baseInfo.id,
+				splitList: rifhtNewData,
+			};
+			if (isTrue.length > 0) {
+				api.splitOrder(obj, 'supplyPurchaseOrder').then((res : any) => {
+					if (res.code === 200) {
+						this.$message.success('拆单成功!');
+						this.getPageList({ pageSize: 20, pageNo: 1 }, 'all'); // 综合数据
+						this.vxeValue = false;
+					} else this.$message.error(res.msg);
+				})
+			} else this.$message.warning('请输入拆单销售数据');
 		}
 		// 保存新增
 		doSave() {
@@ -615,22 +638,34 @@
 		openEdit(e : any) {
 			e = e.row ? e.row : e;
 			let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
-			billConfig.tool.customTools = [
-				{
-					name: '拆单', icon: 'el-icon-minus', audit: [''], event: {
-						click: () => {
-							(this as any).orderTaking(e)
+			if (e.isMaster === 1) {
+				billConfig.tool.customTools = [
+					{
+						name: '拆单', icon: 'el-icon-minus', audit: [''], event: {
+							click: () => {
+								(this as any).orderTaking(e)
+							}
+						}
+					},
+					{
+						name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
+							click: () => {
+								// (this as any)
+							}
 						}
 					}
-				},
-				{
-					name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
-						click: () => {
-							// (this as any)
+				];
+			} else {
+				billConfig.tool.customTools = [
+					{
+						name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
+							click: () => {
+								// (this as any)
+							}
 						}
 					}
-				}
-			];
+				];
+			};
 			(this.$refs.bill as any).setBillConfig(billConfig);
 			(this.$refs.bill as any).setBillFormValue(e); // 设置单据表单数据
 			(this.$refs.bill as any).setBillTableValue(e.suborderList, 0);// 设置第1张单据表格数据

+ 0 - 28
src/views/audit/warehousing/components/focus.vue

@@ -1,28 +0,0 @@
-<template>
-	<div>
-		<el-input placeholder="请选择供应商" v-model="propValue" class="input-organizationName" clearable :readonly="true">
-			<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
-		</el-input>
-		<!-- 选择机构名称 -->
-		<supplier-modal ref="supplierModal" @confirm="confirm" />
-	</div>
-</template>
-
-<script lang="ts">
-	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-	@Component
-	export default class Focus extends Vue {
-		@Prop()
-		propValue : any
-		handleSupplier() {
-			(this.$refs.supplierModal as any).setShow(true);
-		}
-		// 确定机构名称
-		confirm(e : any) {
-			this.$emit('getSupplierModal', e[0])
-		}
-	}
-</script>
-
-<style>
-</style>

+ 0 - 172
src/views/audit/warehousing/components/productModal.vue

@@ -1,172 +0,0 @@
-<template>
-	<vxe-modal v-model="value" id="productDialogModal" :width="width?width+'px':'80%'" @show="show"
-		:height="height?height+'px':'80%'" min-width="500" min-height="400" show-zoom resize transfer show-footer
-		@confirm="confirm">
-		<template #title>
-			<span>选择商品</span>
-		</template>
-		<template #default>
-			<module-view :propConfig="config" ref="view" @pagination="getList" @search="getList" @resert="getList"
-				@clickHandle="clickHandle" />
-		</template>
-	</vxe-modal>
-</template>
-
-<script lang="ts">
-	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-	@Component
-	export default class ProductModal extends Vue {
-		value = false
-		time : any;
-		timeNum = 0;
-		data : Array<any> = []
-
-		@Prop()
-		width ?: number
-
-		@Prop()
-		height ?: number
-
-		@Prop()
-		mulit ?: boolean
-
-		config : any = {
-			search: {
-				attr: {
-					size: 'mini'
-				},
-				columns: [
-					[{
-						span: 6,
-						label: '标题',
-						prop: 'skuTitle',
-						component: 'by-input',
-						compConfig: {
-							attr: {
-								clearable: true,
-								placeholder: '请输入名称'
-							}
-						}
-					}]
-				]
-			},
-			tool: {
-				tools: {
-					search: true,
-					refresh: true
-				}
-			},
-			table: {
-				attr: {
-					size: 'mini',
-					seq: true,
-					align: 'center',
-					checkbox:true,
-					pageSize: 10
-				},
-				columns:
-					[
-						{
-							title: '标题',
-							field: 'skuTitle',
-							// width: 150
-						},
-						{
-							title: '副标题',
-							field: 'skuSubtitle',
-							// width: 150
-						},
-						{
-							title: '规格',
-							field: 'materialSpec'
-						},
-						{
-							title: '单位',
-							field: 'unit'
-						},
-						{
-							title: '单价',
-							field: 'price'
-						},
-					]
-			},
-			// request:{
-			//   url:'/system/maindataMaterial/page'
-			// }
-		}
-		brandData : Array<any> = []
-
-		getBrandData() {
-			return this.brandData;
-		}
-
-		clickHandle(n : string) {
-			if (n == 'onRefresh') {
-				this.getList()
-			}
-		}
-
-		setShow(v : boolean) {
-			this.value = v;
-		}
-
-		mounted() { }
-
-		//确定
-		confirm() {
-			let data : Array<any> = this.getSelectdata();
-			this.$emit('confirm', data);
-			this.value = false;
-		}
-		//获取已选中表格数据
-		getSelectdata() {
-			let data : Array<any> = [];
-			if (this.$refs.view) {
-				data = (this.$refs.view as any).getSelectData()
-			}
-			return data;
-		}
-		//显示弹窗
-		show() {
-			if (this.data.length == 0) {
-				this.time = setInterval(() => {
-					this.getList()
-				}, 500)
-			}
-			if (this.$refs.view) {
-				(this.$refs.view as any).clearCheckboxRow();
-			}
-		}
-		getList() {
-			if (!this.$refs.view) {
-				if (this.timeNum > 5) {
-					clearInterval(this.time)
-				}
-				this.timeNum++;
-				return
-			}
-			clearInterval(this.time)
-			let query : any = (this.$refs.view as any).getQuery();
-			query.isLikeSearch = '1';
-			(this as any).$request({
-				url: '/maindata/maindataMaterialSku/page',
-				method: 'get',
-				params: query
-			}).then((res : any) => {
-				if (res.data.records) {
-					(this.$refs.view as any).setTableValue(res.data.records);
-					this.data = res.data.records;
-					let page = {
-						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
-						total: res.data.total //总条数
-					};
-					(this.$refs.view as any).setPage(page)
-				}
-			})
-		}
-	}
-</script>
-<style lang="scss" scoped>
-
-</style>

+ 10 - 5
src/views/audit/warehousing/index.vue

@@ -12,8 +12,8 @@
 <script lang="ts">
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/order";
-	import productModal from "./components/productModal.vue";
-	import Focus from "./components/focus.vue";
+	import productModal from "../orderTask/components/productModal.vue";
+	import Focus from "../orderTask/components/focus.vue";
 	@Component({ components: { productModal } })
 	export default class OrderTask extends Vue {
 		// 左边
@@ -42,9 +42,9 @@
 						size: 'small',
 						readonly: false,
 						rules: {
-							orderNumber: [{
-								required: true, message: '请输入单据编号', trigger: 'blur'
-							}]
+							// orderNumber: [{
+							// 	required: true, message: '请输入单据编号', trigger: 'blur'
+							// }]
 						}
 					},
 					columns: [
@@ -54,6 +54,11 @@
 								label: '单据编号',
 								prop: 'orderNumber',
 								component: 'by-input',
+								compConfig: {
+									attr: {
+										readonly: true
+									},
+								}
 							},
 							{
 								span: 8,