Prechádzať zdrojové kódy

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

ymy 1 rok pred
rodič
commit
f65ec059a9

+ 1 - 1
src/benyun/components/moduleView/moduleView.vue

@@ -144,7 +144,7 @@ export default class ModuleView extends ModuleViewHandle {
     }else{
       this.$emit('clickHandle',e)
     }
-    if(e == 'toggleSearch'){
+    if(e == 'toggleSearch'&&this.attrs.calculateH){
       this.calculateCount=0;
       setTimeout(()=>{
         this.initTable()

+ 24 - 0
src/components/Assembly/financial.vue

@@ -0,0 +1,24 @@
+<template>
+	<div>
+		<el-input style="width: 100%;" :readonly="true" :value="value"></el-input>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	@Component
+	export default class Financial extends Vue {
+		@Prop()
+		propValue : any
+		value : any = ''
+		@Watch('propValue')
+		propValueChange(v : any) {
+			v === 0 ? this.value = '是' : this.value = '否';
+		};
+		created() {
+
+		}
+	}
+</script>
+
+<style>
+</style>

+ 24 - 0
src/components/Assembly/orderStatus.vue

@@ -0,0 +1,24 @@
+<template>
+	<div>
+		<el-input style="width: 100%;" :readonly="true" :value="value"></el-input>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	@Component
+	export default class OrderStatus extends Vue {
+		@Prop()
+		propValue : any
+		value : any = ''
+		@Watch('propValue')
+		propValueChange(v : any) {
+			v=== 0 ? this.value = '未接单' : this.value = '已接单';
+		};
+		created() {
+			
+		}
+	}
+</script>
+
+<style>
+</style>

+ 24 - 0
src/components/Assembly/terminateOrder.vue

@@ -0,0 +1,24 @@
+<template>
+	<div>
+		<el-input style="width: 100%;" :readonly="true" :value="value"></el-input>
+	</div>
+</template>
+<script lang="ts">
+	import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
+	@Component
+	export default class Financial extends Vue {
+		@Prop()
+		propValue : any
+		value : any = ''
+		@Watch('propValue')
+		propValueChange(v : any) {
+			v === 0 ? this.value = '未出库' : v === 1 ? this.value = '已出库' : this.value = '已终止'
+		};
+		created() {
+
+		}
+	}
+</script>
+
+<style>
+</style>

+ 9 - 7
src/views/audit/agencyGoods/index.vue

@@ -138,15 +138,17 @@
 				}, {
 					title: '简称',
 					field: 'shortName'
-				}, {
-					width: 80,
-					title: '状态',
-					field: 'status',
-					component: Assembly,
 				},
+				
 				{
 					title: '备注',
 					field: 'remark',
+				},{
+					width: 80,
+					title: '状态',
+					field: 'status',
+					align: 'center',
+					component: Assembly,
 				}, {
 					width: 120,
 					title: '操作',
@@ -177,7 +179,7 @@
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
 					parentName: [{
-						required: true, message: '请选择级', trigger: 'change'
+						required: true, message: '请选择级', trigger: 'change'
 					}],
 				}
 			},
@@ -185,7 +187,7 @@
 				[
 					{
 						span: 23,
-						label: '级',
+						label: '级',
 						labelWidth: '70px',
 						prop: 'parentName',
 						component: 'select-tree',

+ 1 - 0
src/views/audit/attribute/index.vue

@@ -170,6 +170,7 @@
 					width: 80,
 					title: '状态',
 					field: 'status',
+					align: 'center',
 					component: Assembly,
 				}, {
 					width: 120,

+ 1 - 0
src/views/audit/brand/index.vue

@@ -122,6 +122,7 @@
 					width: 80,
 					title: '状态',
 					field: 'status',
+					align: 'center',
 					component: Assembly,
 				},
 				{

+ 24 - 10
src/views/audit/order/index.vue

@@ -13,12 +13,12 @@
 	@Component
 	export default class Order extends Vue {
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		baseInfo : any = {}
 		config : any = {
 			attr: {
 				activeName: 'all',
-				calculateH: true
 			},
 			// 单据
 			bill: {
@@ -245,22 +245,22 @@
 							field: 'organizationName',
 						},
 						{
-							width: 130,
+							width: 110,
 							title: '交货人',
 							field: 'delivery',
 						},
 						{
-							width: 150,
+							width: 130,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
-							width: 200,
+							width: 250,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
-							width: 130,
+							width: 100,
 							title: '联系方式',
 							field: 'deliveryPhone',
 						},
@@ -273,14 +273,14 @@
 							width: 80,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
-							width: 110,
+							width: 70,
 							title: '操作',
 							action: true,
 							plugins: [{
-								icon: 'el-icon-edit',
 								name: '查看',
 								audit: '',
 								event: {
@@ -306,9 +306,23 @@
 		}
 		created() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 500)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.bill) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			this.config.all.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.bill.$refs.all.$refs.table.recalculate();
+		}
 		getDataList() {
 			if (!this.$refs.bill) {
 				if (this.timeNum > 5) {
@@ -324,7 +338,7 @@
 		getPageList(query : any, type : any) {
 			let data = (this.$refs.bill as any).getTablePage('all');
 			query.pageNo = data.pageNo;
-			query.pageSize = 10;
+			query.pageSize = data.pageSize;
 			query.submitState = 1; // 已提交状态
 			console.log('分页数据 ==> ', query);
 			let loading = this.$loading({ target: '.main-container' });
@@ -365,7 +379,7 @@
 					let parentData = res.data ? res.data : e;
 					let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 					this.baseInfo = parentData;
-					billConfig.tool.tools = {return: true};
+					billConfig.tool.tools = { return: true };
 					if (parentData.status === 0) billConfig.tool.tools = { return: true, order: true, };
 					(this.$refs.bill as any).setBillConfig(billConfig);
 					(this.$refs.bill as any).setBillFormValue(parentData); // 设置单据表单数据

+ 80 - 28
src/views/audit/orderTask/index.vue

@@ -16,6 +16,8 @@
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/order";
 	import Assembly from "@/components/Assembly/order.vue";
+	import Financial from "@/components/Assembly/financial.vue";
+	import OrderStatus from "@/components/Assembly/orderStatus.vue";
 	import productModal from "./components/productModal.vue";
 	import Focus from "./components/focus.vue";
 	@Component({ components: { productModal } })
@@ -35,11 +37,11 @@
 		mergeObj : any = []
 		setStatusData : any = ''
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		config : any = {
 			attr: {
 				activeName: 'all',
-				calculateH: true
 			},
 			// 单据
 			bill: {
@@ -120,6 +122,31 @@
 								prop: 'deliveryWay',
 								component: 'by-input',
 							},
+							{
+								span: 8,
+								label: '导入财务软件',
+								prop: 'toFinancial',
+								component: Financial,
+							},
+							{
+								span: 8,
+								label: '财务系统编号',
+								prop: 'financeOrderId',
+								component: 'by-input',
+								compConfig: {
+									attr: {
+										readonly: true
+									},
+								}
+							},
+						],
+						[
+							{
+								span: 8,
+								label: '接单状态',
+								prop: 'status',
+								component: OrderStatus,
+							},
 						],
 						[
 							{
@@ -150,11 +177,10 @@
 							attr: {
 								size: 'mini',
 								align: 'left',
-								readonly: true
 							},
 							columns:
 								[{
-									width: 270,
+									width: 250,
 									title: '物料名称',
 									field: 'materialName',
 								},
@@ -164,12 +190,12 @@
 									field: 'financeSuborderId',
 								},
 								{
-									width: 120,
+									width: 100,
 									title: '单位',
 									field: 'unit',
 								},
 								{
-									width: 120,
+									width: 100,
 									title: '单位编码',
 									field: 'unitCode',
 								},
@@ -183,11 +209,12 @@
 											size: 'mini',
 											type: 'number',
 											defaultValue: 1,
+											// readonly: true
 										},
 									}
 								},
 								{
-									width: 120,
+									width: 90,
 									title: '单价',
 									field: 'unitPrice',
 									component: 'by-input',
@@ -305,6 +332,7 @@
 					attr: {
 						size: 'mini',
 						align: 'left',
+						height: '620'
 					},
 					columns: [
 						{
@@ -330,17 +358,17 @@
 							field: 'delivery',
 						},
 						{
-							width: 150,
+							width: 140,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
-							width: 200,
+							width: 250,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
-							width: 130,
+							width: 100,
 							title: '联系方式',
 							field: 'deliveryPhone',
 						},
@@ -350,9 +378,10 @@
 							field: 'deliveryWay',
 						},
 						{
-							width: 80,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
@@ -475,17 +504,17 @@
 							field: 'delivery',
 						},
 						{
-							width: 150,
+							width: 140,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
-							width: 200,
+							width: 250,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
-							width: 130,
+							width: 100,
 							title: '联系方式',
 							field: 'deliveryPhone',
 						},
@@ -495,9 +524,10 @@
 							field: 'deliveryWay',
 						},
 						{
-							width: 80,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
@@ -594,7 +624,7 @@
 						align: 'left',
 						checkbox: true,
 						triggerRowCheck: 'row',
-						maxHeight: "620"
+						height: "620"
 					},
 					columns: [
 						{
@@ -609,7 +639,6 @@
 							title: '机构名称',
 							field: 'organizationName',
 						},
-
 						{
 							width: 80,
 							title: '来源类型',
@@ -621,17 +650,17 @@
 							field: 'delivery',
 						},
 						{
-							width: 150,
+							width: 140,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
-							width: 200,
+							width: 250,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
-							width: 130,
+							width: 100,
 							title: '联系方式',
 							field: 'deliveryPhone',
 						},
@@ -641,13 +670,14 @@
 							field: 'deliveryWay',
 						},
 						{
-							width: 80,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
-							width: 110,
+							width: 90,
 							title: '操作',
 							action: true,
 							plugins: [
@@ -773,17 +803,17 @@
 							field: 'delivery',
 						},
 						{
-							width: 150,
+							width: 140,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
-							width: 200,
+							width: 250,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
-							width: 130,
+							width: 100,
 							title: '联系方式',
 							field: 'deliveryPhone',
 						},
@@ -793,9 +823,10 @@
 							field: 'deliveryWay',
 						},
 						{
-							width: 80,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
@@ -820,9 +851,26 @@
 		}
 		created() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 500)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.bill) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			this.config.smt.table.attr.height = window.innerHeight - 300;
+			this.config.draftsBox.table.attr.height = window.innerHeight - 300;
+			this.config.all.table.attr.height = window.innerHeight - 300;
+			this.config.recycleBin.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.bill.$refs.all.$refs.table.recalculate();
+		}
 		// 保存
 		onSave() {
 			console.log('保存tabType ==>', this.tabType);
@@ -890,7 +938,7 @@
 					this.tableData = [];
 					(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
 				};
-				billConfig.tableConfig[0].tool.tools = { return: true, add: true };
+				billConfig.tableConfig[0].tool.tools = { add: true };
 				this.isAdd = true;
 				(this.$refs.bill as any).setBillConfig(billConfig);
 				(this.$refs.bill as any).setBillFormValue({}); // 设置单据表单数据
@@ -1172,7 +1220,7 @@
 		getPageList(query : any, type : any) {
 			let data = (this.$refs.bill as any).getTablePage(this.tabType);
 			query.pageNo = data.pageNo;
-			query.pageSize = 10;
+			query.pageSize = data.pageSize;
 			console.log('分页数据 ==> ', query);
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'supplyTaskOrder').then((res : any) => {
@@ -1215,6 +1263,10 @@
 		}
 		// 回收站数据
 		getSelectDeleteList(query : any) {
+			let data = (this.$refs.bill as any).getTablePage(this.tabType);
+			query.pageNo = data.pageNo;
+			query.pageSize = data.pageSize;
+			console.log('分页数据 ==> ', query);
 			let loading = this.$loading({ target: '.main-container' });
 			api.selectDeleteList(query, 'supplyTaskOrder').then((res : any) => {
 				loading.close();

+ 66 - 21
src/views/audit/outbound/index.vue

@@ -32,6 +32,7 @@
 		businessType : any = '' // 业务类型
 		tableData : any = []
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		config : any = {
 			attr: {
@@ -84,7 +85,7 @@
 							seq: true,
 							align: 'left',
 							radio: true,
-							triggerRowCheck: 'row'
+							triggerRowCheck: 'row',
 						},
 						columns: [
 							{
@@ -118,7 +119,7 @@
 								field: 'affirmDeliveryData',
 							},
 							{
-								width: 150,
+								width: 350,
 								title: '交货地点',
 								field: 'address',
 							}
@@ -425,17 +426,17 @@
 							field: 'receive',
 						},
 						{
-							width: 120,
+							width: 250,
 							title: '收货地址',
 							field: 'receiveAddress',
 						},
 						{
-							width: 120,
+							width: 100,
 							title: '联系方式',
 							field: 'receivePhone',
 						},
 						{
-							width: 120,
+							width: 70,
 							title: '业务类型',
 							field: 'businessType',
 						},
@@ -530,17 +531,17 @@
 							field: 'receive',
 						},
 						{
-							width: 120,
+							width: 250,
 							title: '收货地址',
 							field: 'receiveAddress',
 						},
 						{
-							width: 120,
+							width: 100,
 							title: '联系方式',
 							field: 'receivePhone',
 						},
 						{
-							width: 120,
+							width: 70,
 							title: '业务类型',
 							field: 'businessType',
 						},
@@ -633,7 +634,7 @@
 						align: 'left',
 						checkbox: true,
 						triggerRowCheck: 'row',
-						maxHeight: "620"
+						height: "620"
 					},
 					columns: [
 						{
@@ -664,22 +665,22 @@
 							field: 'receive',
 						},
 						{
-							width: 120,
+							width: 250,
 							title: '收货地址',
 							field: 'receiveAddress',
 						},
 						{
-							width: 120,
+							width: 100,
 							title: '联系方式',
 							field: 'receivePhone',
 						},
 						{
-							width: 120,
+							width: 70,
 							title: '业务类型',
 							field: 'businessType',
 						},
 						{
-							width: 120,
+							width: 90,
 							title: '操作',
 							action: true,
 							plugins: [{
@@ -763,22 +764,22 @@
 							field: 'receive',
 						},
 						{
-							width: 120,
+							width: 250,
 							title: '收货地址',
 							field: 'receiveAddress',
 						},
 						{
-							width: 120,
+							width: 100,
 							title: '联系方式',
 							field: 'receivePhone',
 						},
 						{
-							width: 120,
+							width: 70,
 							title: '业务类型',
 							field: 'businessType',
 						},
 						{
-							width: 110,
+							width: 90,
 							title: '操作',
 							action: true,
 							plugins: [{
@@ -797,9 +798,26 @@
 		}
 		created() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 500)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.bill) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			this.config.smt.table.attr.height = window.innerHeight - 300;
+			this.config.draftsBox.table.attr.height = window.innerHeight - 300;
+			this.config.all.table.attr.height = window.innerHeight - 300;
+			this.config.recycleBin.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.bill.$refs.all.$refs.table.recalculate();
+		}
 		//打印前数据修改
 		printBefore(params : any) {
 			params.templateId = 12;
@@ -877,6 +895,7 @@
 						v.deliveryNumber = v.number - v.outNumber;
 						if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
 					});
+					parentData[0].operator = (this as any).$store.getters.userInfo.userName;
 					this.tableData = parentData[0].suborderList;
 					billConfig.tool.tools = { save: true, smt: true };
 					// console.log('this.tableData ==> ', this.tableData);
@@ -903,14 +922,33 @@
 			e.realityPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
 			e.totalPrice = e.realityPrice;
 			// e.totalPrice = e.realityPrice - e.prePrice;
-
+		}
+		// 获取当前时间
+		getNowDate() {
+			let date = new Date();
+			let years : any = date.getFullYear();
+			let months : any = date.getMonth() + 1;
+			let days : any = date.getDate();
+			let hours : any = date.getHours();
+			let minutes : any = date.getMinutes();
+			let seconds : any = date.getSeconds();
+			months = months < 10 ? '0' + months : months;
+			days = days < 10 ? '0' + days : days;
+			hours = hours < 10 ? '0' + hours : hours;
+			minutes = minutes < 10 ? '0' + minutes : minutes;
+			seconds = seconds < 10 ? '0' + seconds : seconds;
+			return `${years}-${months}-${days} ${hours}:${minutes}:${seconds}`;
 		}
 		// 同步出库单到财务系统
 		syncSystem() {
 			let selectData = (this as any).$refs.bill.getTableSelectData(this.tabType);
 			if (selectData.length > 0) {
 				if (selectData.length > 1) return this.$message.warning('只能同步一条数据');
+				if (selectData[0].financeOrderId) return this.$message.warning('此数据已同步财务编号');
 				// if (selectData[0].submitState != 1) return this.$message.warning('只能同步已提交数据');
+				let planData = selectData[0].planDeliveryData.replaceAll(/[-:\s]/g, '');
+				let nowDate = this.getNowDate().replaceAll(/[-:\s]/g, '');
+				if (planData < nowDate) return this.$message.warning('计划交货时间小于当前时间,不能同步财务编号');
 				this.$confirm('确定同步订单吗', '注意', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
@@ -992,7 +1030,11 @@
 			this.tabType = e;
 			(this.$refs.bill as any).showTab = e;
 			// submitState: 提交状态
-			if (e === 'source') { this.getCitationList({}) }; // 引单出库
+			if (e === 'source') {
+				// this.config.source[0].table.attr.height = window.innerHeight - 200;
+				// (this as any).$refs.bill.$refs.source_0[0].$refs.table.recalculate();
+				this.getCitationList({})
+			}; // 引单出库
 			if (e === 'all') this.getPageList({}, 'all'); // 草稿箱数据
 			if (e === 'draftsBox') this.getPageList({ submitState: 0 }, 'draftsBox'); // 草稿箱数据
 			if (e === 'smt') this.getPageList({ submitState: 1 }, 'smt'); // 已提交数据
@@ -1281,7 +1323,7 @@
 		getPageList(query : any, type : any) {
 			let data = (this.$refs.bill as any).getTablePage(this.tabType);
 			query.pageNo = data.pageNo;
-			query.pageSize = 10;
+			query.pageSize = data.pageSize;
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'supplyOutOrder').then((res : any) => {
 				loading.close();
@@ -1331,6 +1373,9 @@
 		}
 		// 回收站数据
 		getSelectDeleteList(query : any) {
+			let data = (this.$refs.bill as any).getTablePage(this.tabType);
+			query.pageNo = data.pageNo;
+			query.pageSize = data.pageSize;
 			let loading = this.$loading({ target: '.main-container' });
 			api.selectDeleteList(query, 'supplyOutOrder').then((res : any) => {
 				loading.close();

+ 8 - 7
src/views/audit/productClassification/index.vue

@@ -134,17 +134,18 @@
 					width: 300,
 					title: '简称',
 					field: 'shortName'
-				}, {
-					width: 80,
-					title: '状态',
-					field: 'status',
-					component: Assembly,
 				},
 				{
 					width: 300,
 					title: '备注',
 					field: 'remark',
 				}, {
+					width: 80,
+					title: '状态',
+					field: 'status',
+					align: 'center',
+					component: Assembly,
+				},{
 					width: 120,
 					title: '操作',
 					action: true,
@@ -174,7 +175,7 @@
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
 					parentName: [{
-						required: true, message: '请选择级', trigger: 'change'
+						required: true, message: '请选择级', trigger: 'change'
 					}],
 				}
 			},
@@ -182,7 +183,7 @@
 				[
 					{
 						span: 23,
-						label: '级',
+						label: '级',
 						labelWidth: '70px',
 						prop: 'parentName',
 						component: 'select-tree',

+ 16 - 15
src/views/audit/productManagement/index.vue

@@ -1026,21 +1026,21 @@
 
 					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');
+						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 = { maindataMaterialReceiveParam: query, maindataMaterialSkus: this.tableList }
 					let newArray : any = []
@@ -1678,6 +1678,7 @@
 		box-sizing: border-box;
 		display: flex;
 		padding: 16px;
+		height: 100%;
 
 		.bill-left {
 			position: relative;

+ 15 - 0
src/views/audit/saleOrder/components/settingConfig.vue

@@ -240,6 +240,21 @@
 							}
 						}
 					},
+					{
+						span: 8,
+						label: '库存组织',
+						prop: 'FStockOrgId',
+						component: 'by-input',
+						rules: [
+							{ required: true, message: '请输入库存组织', trigger: 'blur' }
+						],
+						compConfig: {
+							attr: {
+								placeholder: '请输入库存组织',
+								clearable: true
+							}
+						}
+					},
 				]
 			]
 		}

+ 74 - 21
src/views/audit/saleOrder/index.vue

@@ -34,16 +34,18 @@
 	import OrderType from "./components/orderType.vue";
 	import SettingConfig from "./components/settingConfig.vue";
 	import Assembly from "@/components/Assembly/saleOrder.vue";
+	import TerminateOrder from "@/components/Assembly/terminateOrder.vue";
 	@Component({ components: { SettingConfig } })
 	export default class SaleOrder extends Vue {
 		tabType : any = 'all';
 		vxeValue = false
 		isCitation = false
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		baseInfo : any = {} // 订单数据
 		regularData : any = [] // 固定值
-		
+
 		leftTableConfig : any = {
 			attr: {
 				size: 'mini',
@@ -165,7 +167,7 @@
 							seq: true,
 							align: 'left',
 							radio: true,
-							triggerRowCheck: 'row'
+							triggerRowCheck: 'row',
 						},
 						columns: [
 							{
@@ -218,7 +220,7 @@
 				tool: {
 					tools: {
 						save: true,
-						return:true
+						return: true
 					},
 					customTools: []
 				},
@@ -318,6 +320,17 @@
 									},
 								}
 							},
+							{
+								span: 8,
+								label: '订单状态',
+								prop: 'status',
+								component: TerminateOrder,
+								compConfig: {
+									attr: {
+										readonly: true,
+									},
+								}
+							},
 						],
 						[
 							{
@@ -472,7 +485,7 @@
 						triggerRowCheck: 'row',
 						align: 'left',
 						radio: true,
-						maxHeight: "620"
+						height: '620'
 					},
 					columns: [
 						{
@@ -480,15 +493,15 @@
 							title: '单据编号',
 							field: 'orderNumber',
 							isDetail: true,
-							fixed:'left'
+							fixed: 'left'
 						},
 						{
 							width: 50,
 							component: OrderType,
-							fixed:'left'
+							fixed: 'left'
 						},
 						{
-							width: 180,
+							width: 100,
 							title: '机构名称',
 							field: 'organizationName',
 						},
@@ -518,14 +531,15 @@
 							field: 'affirmDeliveryData',
 						},
 						{
-							width: 150,
+							width: 250,
 							title: '交货地点',
 							field: 'address',
 						},
 						{
-							width: 80,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
@@ -614,6 +628,7 @@
 					attr: {
 						size: 'mini',
 						align: 'left',
+						height: '620'
 					},
 					columns: [
 						{
@@ -624,7 +639,7 @@
 							fixed: 'left'
 						},
 						{
-							width: 180,
+							width: 130,
 							title: '机构名称',
 							field: 'organizationName',
 						},
@@ -634,7 +649,7 @@
 							field: 'financeOrderId',
 						},
 						{
-							width: 90,
+							width: 120,
 							title: '收货人',
 							field: 'consignee',
 						},
@@ -654,14 +669,15 @@
 							field: 'affirmDeliveryData',
 						},
 						{
-							width: 150,
+							width: 250,
 							title: '交货地点',
 							field: 'address',
 						},
 						{
-							width: 100,
+							width: 70,
 							title: '状态',
 							field: 'status',
+							align: 'center',
 							component: Assembly,
 						},
 						{
@@ -686,9 +702,25 @@
 		}
 		created() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 500)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.bill) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			this.config.source[0].table.attr.height = window.innerHeight - 300;
+			this.config.all.table.attr.height = window.innerHeight - 300;
+			this.config.returnOrder.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.bill.$refs.all.$refs.table.recalculate();
+		}
 		// 参数配置
 		configuration() {
 			(this as any).$refs.setForm.openSetting();
@@ -834,7 +866,7 @@
 		getPageList(query : any, type : any) {
 			let data = (this.$refs.bill as any).getTablePage('all');
 			query.pageNo = data.pageNo;
-			query.pageSize = 10;
+			query.pageSize = data.pageSize;
 			let loading = this.$loading({ target: '.main-container' });
 			api.pageList(query, 'supplyPurchaseOrder').then((res : any) => {
 				loading.close();
@@ -851,9 +883,6 @@
 		}
 		// 获取引单分页数据
 		getCitationList(query : any) {
-			let data = (this.$refs.bill as any).getTablePage('all');
-			query.pageNo = data.pageNo;
-			query.pageSize = data.pageSize;
 			query.submitState = 1; // 已提交
 			query.status = 0; // 未接单
 			let loading = this.$loading({ target: '.main-container' });
@@ -931,7 +960,7 @@
 							];
 						}
 					};
-					billConfig.tool.tools = {return:true};
+					billConfig.tool.tools = { return: true };
 					billConfig.form.columns[0].map((v : any) => {
 						v.compConfig.attr.readonly = true;
 					})
@@ -942,7 +971,7 @@
 						billConfig.form.columns[0][4].compConfig.attr.readonly = false;
 						billConfig.form.columns[0][6].compConfig.attr.readonly = false;
 						billConfig.form.columns[1][0].compConfig.attr.readonly = false;
-						billConfig.tool.tools = {return:true, save: true };
+						billConfig.tool.tools = { return: true, save: true };
 					};
 					console.log(parentData.suborderList);
 					(this.$refs.bill as any).setBillConfig(billConfig);
@@ -971,11 +1000,31 @@
 				(this.$refs.bill as any).setBillConfig(billConfig);
 			}
 		}
+		// 获取当前时间
+		getNowDate() {
+			let date = new Date();
+			let years : any = date.getFullYear();
+			let months : any = date.getMonth() + 1;
+			let days : any = date.getDate();
+			let hours : any = date.getHours();
+			let minutes : any = date.getMinutes();
+			let seconds : any = date.getSeconds();
+			months = months < 10 ? '0' + months : months;
+			days = days < 10 ? '0' + days : days;
+			hours = hours < 10 ? '0' + hours : hours;
+			minutes = minutes < 10 ? '0' + minutes : minutes;
+			seconds = seconds < 10 ? '0' + seconds : seconds;
+			return `${years}-${months}-${days} ${hours}:${minutes}:${seconds}`;
+		}
 		// 同步销售订单到财务系统
 		syncSystem() {
 			let selectData = (this as any).$refs.bill.getTableSelectData('all');
 			if (selectData.length > 0) {
 				if (selectData[0].isMaster !== 1 || selectData[0].status !== 0) return this.$message.warning('只能同步未出库的主单');
+				if (selectData[0].financeOrderId) return this.$message.warning('此数据已同步财务编号');
+				let planData = selectData[0].planDeliveryData.replaceAll(/[-:\s]/g, '');
+				let nowDate = this.getNowDate().replaceAll(/[-:\s]/g, '');
+				if (planData < nowDate) return this.$message.warning('计划交货时间小于当前时间,不能同步财务编号');
 				this.$confirm('确定同步订单吗', '注意', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
@@ -1002,6 +1051,10 @@
 				type: 'warning',
 				center: true
 			}).then(() => {
+				if (e.financeOrderId) return this.$message.warning('此数据已同步财务编号');
+				let planData = e.planDeliveryData.replaceAll(/[-:\s]/g, '');
+				let nowDate = this.getNowDate().replaceAll(/[-:\s]/g, '');
+				if (planData < nowDate) return this.$message.warning('计划交货时间小于当前时间,不能同步财务编号');
 				let loading = this.$loading({ target: '.main-container' });
 				api.addSaleOrder({ ids: e.id }).then((res : any) => {
 					loading.close();
@@ -1084,7 +1137,7 @@
 			}
 		}
 		// 返回
-		onReturn(){
+		onReturn() {
 			this.clickTab(this.tabType);
 		}
 		// 搜索

+ 29 - 8
src/views/audit/sku/index.vue

@@ -1,9 +1,9 @@
 <template>
 	<div class="my-container">
 		<transition name="el-zoom-in-center">
-			<div class="bill-main" v-show="isShow==='home'" key="index">
-				<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-					@resert="onRefresh" @detail="openEdit" @onRefresh="onRefresh">
+			<div class="bill-main" key="index">
+				<module-view :propConfig="config" v-show="isShow==='home'" ref="moduleView" @pagination="getDataList"
+					@search="getDataList" @resert="onRefresh" @detail="openEdit" @onRefresh="onRefresh">
 				</module-view>
 			</div>
 		</transition>
@@ -27,6 +27,7 @@
 		// 右边
 		isShow : any = 'home'
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		toolConfig = {
 			tools: {
@@ -182,9 +183,6 @@
 			]
 		}
 		config : any = {
-			// attr:{
-			// 	calculateH:true
-			// },
 			search: {
 				attr: {
 					size: 'mini'
@@ -238,7 +236,7 @@
 				attr: {
 					size: 'mini',
 					align: 'left',
-					height:'620'
+					height: '620'
 				},
 				columns: [
 					{
@@ -326,9 +324,25 @@
 		}
 		mounted() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 300)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.moduleView) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			let tableId : any = (this as any).$refs.moduleView.tableID;
+			this.config.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.moduleView.$refs[tableId].recalculate();
+		}
+
 		// 保存
 		doFormData() {
 			let data : any = (this as any).$refs.addFormId.getValue()
@@ -399,31 +413,37 @@
 		box-sizing: border-box;
 		display: flex;
 		height: 100%;
+
 		.bill-left {
 			position: relative;
 			border-right: solid #EEE 1px;
 			padding-right: 16px;
 			flex-shrink: 0;
+
 			.bill-tab {
 				width: 150px;
 				height: 100%;
 				transition: all .5s;
 				overflow: hidden;
 			}
+
 			.tab-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;
 			}
 		}
+
 		.bill-main {
 			width: calc(100% - 16px);
 			box-sizing: border-box;
 			margin-left: 16px;
 			position: relative;
 		}
+
 		.detil {
 			width: 100%;
+
 			.box-shadow {
 				box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
 				padding: 20px;
@@ -437,6 +457,7 @@
 				margin-top: 20px;
 			}
 		}
+
 		@media screen and (min-width: 1700px) {
 			.bill-main {
 				min-width: 1450px;

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

@@ -142,6 +142,7 @@
 					width: 80,
 					title: '状态',
 					field: 'status',
+					align: 'center',
 					component: Assembly,
 				},
 				{
@@ -174,7 +175,7 @@
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
 					parentName: [{
-						required: true, message: '请选择级', trigger: 'change'
+						required: true, message: '请选择级', trigger: 'change'
 					}],
 				}
 			},
@@ -182,7 +183,7 @@
 				[
 					{
 						span: 23,
-						label: '级',
+						label: '级',
 						labelWidth: '70px',
 						prop: 'parentName',
 						component: 'select-tree',

+ 32 - 11
src/views/audit/warehousing/index.vue

@@ -61,11 +61,11 @@
 		mergeObj : any = []
 		setStatusData : any = ''
 		timeNum = 0;
+		calculateCount = 0;
 		timer : any = null
 		config : any = {
 			attr: {
 				activeName: 'all',
-				calculateH: true
 			},
 			// 单据
 			bill: {
@@ -184,23 +184,23 @@
 										field: 'materialName',
 									},
 									{
-										width: 200,
+										width: 150,
 										title: '财务编号',
 										field: 'financeSuborderId',
 									},
 									{
-										width: 200,
+										width: 220,
 										title: '仓库,仓位',
 										field: 'towInOne',
 										component: towInOne,
 									},
 									{
-										width: 110,
+										width: 80,
 										title: '单位',
 										field: 'unit',
 									},
 									{
-										width: 120,
+										width: 80,
 										title: '单位编码',
 										field: 'unitCode',
 									},
@@ -531,7 +531,7 @@
 						align: 'left',
 						checkbox: true,
 						triggerRowCheck: 'row',
-						maxHeight: "620"
+						height: "620"
 					},
 					columns: [
 						{
@@ -688,9 +688,26 @@
 		}
 		created() {
 			this.timer = setInterval(() => {
-				this.getDataList()
+				this.getDataList();
+				this.initTable();
 			}, 500)
 		}
+		// 计算高度
+		initTable() {
+			if (!this.$refs.bill) {
+				this.calculateCount++;
+				if (this.calculateCount > 5) return;
+				setTimeout(() => {
+					this.initTable()
+				}, 500)
+				return
+			}
+			this.config.smt.table.attr.height = window.innerHeight - 300;
+			this.config.draftsBox.table.attr.height = window.innerHeight - 300;
+			this.config.all.table.attr.height = window.innerHeight - 300;
+			this.config.recycleBin.table.attr.height = window.innerHeight - 300;
+			(this as any).$refs.bill.$refs.all.$refs.table.recalculate();
+		}
 		// 获取当前日期
 		getNowDate(num : number) {
 			let date = new Date();
@@ -830,7 +847,8 @@
 				billConfig.tableConfig[0].tool.tools = { add: true };
 				this.isAdd = true;
 				(this.$refs.bill as any).setBillConfig(billConfig);
-				(this.$refs.bill as any).setBillFormValue({}); // 设置单据表单数据
+				// 设置单据表单数据
+				(this.$refs.bill as any).setBillFormValue({ operator: (this as any).$store.getters.userInfo.userName });
 			};
 			(this.$refs.bill as any).showTab = 'bill';
 		}
@@ -1041,10 +1059,10 @@
 			this.tabType = e;
 			(this.$refs.bill as any).showTab = e;
 			// submitState: 提交状态
-			if (e === 'all') this.getPageList({ pageSize: 10, pageNo: 1 }, 'all'); // 草稿箱数据
+			if (e === 'all') this.getPageList({}, 'all'); // 草稿箱数据
 			if (e === 'draftsBox') this.getPageList({ submitState: 0 }, 'draftsBox'); // 草稿箱数据
 			if (e === 'smt') this.getPageList({ submitState: 1 }, 'smt'); // 已提交数据
-			if (e === 'recycleBin') this.getSelectDeleteList({ pageNo: 1, pageSize: 10 }); // 回收站数据
+			if (e === 'recycleBin') this.getSelectDeleteList({}); // 回收站数据
 			if (e === 'bill') {
 				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 				billConfig.tool.tools = {};
@@ -1087,7 +1105,7 @@
 		pagination(e : any) {
 			let query : any = (this as any).$refs.bill.getSearchValue(e.type);
 			query.pageNo = e.page.pageNum;
-			query.pageSize = 10;
+			query.pageSize = e.page.pageSize;
 			console.log('分页 ==> ', query);
 			let loading = this.$loading({ target: '.main-container' });
 			if (e.type === 'recycleBin') {
@@ -1108,6 +1126,9 @@
 		}
 		// 回收站数据
 		getSelectDeleteList(query : any) {
+			let data = (this.$refs.bill as any).getTablePage(this.tabType);
+			query.pageNo = data.pageNo;
+			query.pageSize = data.pageSize;
 			let loading = this.$loading({ target: '.main-container' });
 			api.selectDeleteList(query, 'supplyEntryOrder').then((res : any) => {
 				loading.close();