Sfoglia il codice sorgente

单位任务细节修改

AlanWong 2 anni fa
parent
commit
5437eb8f41

+ 11 - 2
src/api/order.ts

@@ -25,12 +25,20 @@ function saveList(data : any, url : any) {
 		data: data
 	})
 }
+// 保存数据
+function msave(data : any, url : any) {
+	return request({
+		url: '/supply/' + url + '/msave',
+		method: 'POST',
+		data: data
+	})
+}
 // 提交数据
 function submitTo(data : any, url : any) {
 	return request({
 		url: '/supply/' + url + '/submitTo',
 		method: 'POST',
-		data: data
+		params: data
 	})
 }
 // 反提交数据
@@ -38,7 +46,7 @@ function cancelSubmission(data : any, url : any) {
 	return request({
 		url: '/supply/' + url + '/cancelSubmission',
 		method: 'POST',
-		data: data
+		params: data
 	})
 }
 
@@ -95,6 +103,7 @@ export default {
 	treeList,
 	pageList,
 	saveList,
+	msave,
 	updateList,
 	deleteList,
 	selectDeleteList,

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

@@ -5,15 +5,15 @@
 	</div>
 </template>
 <script lang="ts">
-	// import { create } from "lodash";
 import { Component, Prop, Vue, Watch, Mixins } from "vue-property-decorator";
 	@Component
 	export default class Order extends Vue {
 		@Prop()
 		propValue : any
-		// created(){
-		// 	console.log(this.propValue===);
-		// }
+		
+		created(){
+			// console.log(this.propValue);
+		}
 	}
 
 </script>

+ 43 - 24
src/views/audit/orderTask/index.vue

@@ -20,6 +20,7 @@
 		// 左边
 		tabType : any = 'all';
 		isAdd : any = false
+		pageSize : any = 15
 		// 右边
 		supplierInfo : any = {} // 机构信息
 		tableData : any = []
@@ -643,28 +644,43 @@
 						{
 							width: 80,
 							title: '状态',
-							field: 'status',
+							field: 'submitState',
 							component: Assembly,
 						},
 						{
 							width: 110,
 							title: '操作',
 							action: true,
-							plugins: [{
-								icon: 'el-icon-edit',
-								name: '编辑',
-								audit: '',
-								event: {
-									click: (e : any) => {
-										(this as any).openEdit(e)
+							plugins: [
+								{
+									// icon: 'el-icon-edit',
+									name: '编辑',
+									audit: '',
+									event: {
+										show: (item : any) => {
+											return item.sourceType == '手工输入' && item.submitState == 0
+										},
+										click: (e : any) => {
+											(this as any).openEdit(e)
+										}
 									}
-								}
-							}, {
-								name: '删除',
-								event: {
-									click: (item : any) => (this as any).doDelete2(item)
-								}
-							}]
+								},
+								{
+									name: '查看',
+									event: {
+										show: (item : any) => {
+											return item.sourceType != '手工输入' || item.submitState == 1
+										},
+										click: (e : any) => (this as any).openEdit(e)
+									}
+								},
+								{
+									name: '删除',
+									event: {
+										click: (item : any) => (this as any).doDelete2(item)
+									}
+								},
+							]
 						}
 					]
 				}
@@ -892,7 +908,7 @@
 				if (this.isAdd) {
 					query.submitState = 0
 					console.log('保存进草稿箱 ==>', query);
-					api.saveList(query, 'supplyTaskOrder').then((res : any) => {
+					api.msave(query, 'supplyTaskOrder').then((res : any) => {
 						if (res.code === 200) {
 							this.$message.success(res.msg);
 							this.getDataList();
@@ -1007,7 +1023,7 @@
 		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
-			e.realityPrice = e.number * e.unitPrice;
+			e.realityPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
 			e.totalPrice = e.realityPrice - e.prePrice;
 		}
 		// 确定商品新增
@@ -1051,10 +1067,10 @@
 			console.log('切换tab ==> ', e);
 			this.tabType = e;
 			// submitState: 提交状态
-			if (e === 'all') this.getPageList({ pageSize: 10, pageNo: 1 }, 'all'); // 草稿箱数据
+			if (e === 'all') this.getPageList({ pageSize: this.pageSize, pageNo: 1 }, '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({ pageNo: 1, pageSize: this.pageSize }); // 回收站数据
 		}
 		// 初始化
 		getDataList() {
@@ -1066,14 +1082,14 @@
 				return
 			}
 			clearInterval(this.timer)
-			this.getPageList({ pageSize: 10, pageNo: 1 }, 'all'); // 综合数据
+			this.getPageList({ pageSize: this.pageSize, pageNo: 1 }, 'all'); // 综合数据
 		}
 		// 分页
 		pagination(e : any) {
 			console.log('分页 ==> ', e);
-			let query = {
+			let query : any = {
 				pageNo: e.page.pageNum,
-				pageSize: e.page.pageSize,
+				pageSize: this.pageSize,
 			};
 			let loading = this.$loading({ target: '.main-container' });
 			if (e.type === 'recycleBin') {
@@ -1084,6 +1100,9 @@
 					} else this.failHandle(res)
 				});
 			} else {
+				console.log(this.tabType);
+				if (this.tabType == 'draftsBox') query.submitState = 0;
+				if (this.tabType == 'smt') query.submitState = 1;
 				api.pageList(query, 'supplyTaskOrder').then((res : any) => {
 					if (res.code === 200) {
 						(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
@@ -1100,7 +1119,7 @@
 					(this.$refs.bill as any).setTabTableValue(type, res.data.records);
 					let page = {
 						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
+						pageSize: this.pageSize, //每页条数
 						total: res.data.total //总条数
 					};
 					(this.$refs.bill as any).setTablePage(type, page)
@@ -1114,7 +1133,7 @@
 					(this.$refs.bill as any).setTabTableValue('recycleBin', res.data.records);
 					let page = {
 						pageNo: res.data.current, //当前页
-						pageSize: res.data.size, //每页条数
+						pageSize: this.pageSize, //每页条数
 						total: res.data.total //总条数
 					};
 					(this.$refs.bill as any).setTablePage('recycleBin', page)

+ 151 - 37
src/views/audit/outbound/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div>
-		<by-bill ref="bill" :propConfig="config" @search="search" @onAdd="onAdd" @onDelete="onDelete" @onRefresh="onRefresh"
+		<by-bill ref="bill" :propConfig="config" @search="search" @onDelete="onDelete" @onRefresh="onRefresh"
 			@detail="openEdit" @onSave="onSave" @clickTab="clickTab" @onChangeRow="onChangeRow" @pagination="pagination"
 			@getSupplierModal="getSupplierModal">
 		</by-bill>
@@ -31,6 +31,128 @@
 			attr: {
 				activeName: 'all'
 			},
+			// 引单
+			source: [
+				{
+					title: '销售订单',
+					search: {
+						attr: {
+							size: 'mini',
+						},
+						columns: [
+							[
+								{
+									span: 6,
+									label: '单据编号',
+									prop: 'orderNumber',
+									component: 'by-input',
+									compConfig: {
+										attr: {
+											placeholder: '请输入单据编号',
+											clearable: true
+										}
+									}
+								},
+								{
+									span: 6,
+									label: '机构名称',
+									prop: 'organizationName',
+									component: 'by-input',
+									compConfig: {
+										attr: {
+											placeholder: '请输入机构名称',
+											clearable: true
+										},
+									},
+								},
+								{
+									span: 6,
+									label: '退单编号',
+									prop: 'chargebackNo',
+									component: 'by-input',
+									compConfig: {
+										attr: {
+											placeholder: '请输入退单编号',
+											clearable: true
+										}
+									}
+								},
+							],
+						]
+					},
+					tool: {
+						tools: {
+							search: true,
+							refresh: true
+						},
+						customTools: [
+							{
+								name: '引单', icon: 'el-icon-bottom', audit: [''], event: {
+									click: () => {
+										// (this as any).onAdd('all')
+									}
+								}
+							},
+						]
+					},
+					table: {
+						attr: {
+							height: 600,
+							size: 'mini',
+							seq: true,
+							align: 'left',
+							radio: true
+						},
+						columns: [
+							{
+								width: 144,
+								title: '单据编号',
+								field: 'orderNumber',
+								isDetail: true,
+							},
+							// {
+							// 	width: 50,
+							// 	component: OrderType,
+							// },
+							{
+								width: 180,
+								title: '机构名称',
+								field: 'organizationName',
+							},
+							{
+								width: 178,
+								title: '退单编号',
+								field: 'chargebackNo',
+							},
+							{
+								width: 90,
+								title: '收货人',
+								field: 'consignee',
+							},
+							{
+								width: 120,
+								title: '联系方式',
+								field: 'phone',
+							},
+							{
+								width: 150,
+								title: '计划交货时间',
+								field: 'planDeliveryData',
+							},
+							{
+								width: 150,
+								title: '确定交货时间',
+								field: 'affirmDeliveryData',
+							},
+							{
+								width: 150,
+								title: '交货地点',
+								field: 'address',
+							}
+						]
+					}
+				},
+			],
 			// 单据
 			bill: {
 				tool: {
@@ -105,11 +227,6 @@
 				},
 				tableConfig: [
 					{
-						tool: {
-							tools: {
-								add: true
-							}
-						},
 						table: {
 							attr: {
 								size: 'mini',
@@ -329,8 +446,8 @@
 							title: '操作',
 							action: true,
 							plugins: [{
-								icon: 'el-icon-edit',
-								name: '编辑',
+								// icon: 'el-icon-edit',
+								name: '查看',
 								audit: '',
 								event: {
 									click: (e : any) => {
@@ -536,7 +653,7 @@
 						{
 							name: '出库', icon: 'el-icon-top', audit: [''], event: {
 								click: () => {
-									(this as any).onAdd('all')
+									(this as any).outbound('all')
 								}
 							}
 						},
@@ -609,8 +726,8 @@
 							title: '操作',
 							action: true,
 							plugins: [{
-								icon: 'el-icon-edit',
-								name: '编辑',
+								// icon: 'el-icon-edit',
+								name: '查看',
 								audit: '',
 								event: {
 									click: (e : any) => {
@@ -766,7 +883,7 @@
 		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
-			e.realityPrice = e.number * e.unitPrice;
+			e.realityPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
 			e.totalPrice = e.realityPrice - e.prePrice;
 		}
 		// 确定商品新增
@@ -859,30 +976,29 @@
 				};
 			})
 		}
-		// 打开新增
-		onAdd(e : any) {
+		// 出库打开引单
+		outbound(e : any) {
 			console.log('出库 ==>', e);
-			if (e === 'billTable_0') {
-				(this.$refs.product as any).setShow(true); // 打开sku弹窗
-				let obj = (this.$refs.bill as any).getBillFormValue();
-				if (!this.tableData) this.tableData = obj.suborderList;
-				console.log('this.tableData ==> ', this.tableData);
-				(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
-			} else {
-				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
-				billConfig.form.attr.readonly = false; // 设置只读
-				billConfig.tool.tools = { save: true, };
-				if (e === 'all') {
-					billConfig.tool.tools = { save: true, smt: true };
-					this.tableData = [];
-					(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
-				}
-				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).showTab = 'bill';
+			(this.$refs.bill as any).showTab = 'source';
+			// if (e === 'billTable_0') {
+			// 	(this.$refs.product as any).setShow(true); // 打开sku弹窗
+			// 	let obj = (this.$refs.bill as any).getBillFormValue();
+			// 	if (!this.tableData) this.tableData = obj.suborderList;
+			// 	console.log('this.tableData ==> ', this.tableData);
+			// 	(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
+			// } else {
+			// 	let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
+			// 	billConfig.form.attr.readonly = false; // 设置只读
+			// 	billConfig.tool.tools = { save: true, };
+			// 	if (e === 'all') {
+			// 		billConfig.tool.tools = { save: true, smt: true };
+			// 		this.tableData = [];
+			// 		(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
+			// 	}
+			// 	this.isAdd = true;
+			// 	(this.$refs.bill as any).setBillConfig(billConfig);
+			// 	(this.$refs.bill as any).setBillFormValue({}); // 设置单据表单数据
+			// };
 		}
 		// 打开编辑
 		openEdit(e : any) {
@@ -918,7 +1034,6 @@
 				billConfig.form.attr.readonly = false; // 设置只读
 				billConfig.tool.tools = { save: true, };
 				if (this.tabType === 'draftsBox' || e.submitState === 0) billConfig.tool.tools = { save: true, smt: true };
-				billConfig.tableConfig[0].tool.tools = { add: true };
 				this.tableData = data;
 				(this.$refs.bill as any).setBillConfig(billConfig);
 				(this.$refs.bill as any).setBillFormValue(e);// 设置单据表单数据
@@ -935,7 +1050,6 @@
 			readonly.form.attr.readonly = true; // 设置只读
 			readonly.tool.tools = {};
 			readonly.tableConfig[0].table.columns = readonly.tableConfig[0].table.columns.filter((v : any) => v.title != '操作');
-			readonly.tableConfig[0].tool.tools = {};
 			console.log(readonly.tableConfig[0].table.columns.slice(0, -1));
 			let data = e.suborderList;
 			(this.$refs.bill as any).setBillConfig(readonly);

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

@@ -93,7 +93,7 @@
 							attr: {
 								size: 'mini',
 								type: 'integer',
-								placeholder:'请输入数量'
+								placeholder: '请输入数量'
 							},
 						}
 					},
@@ -358,24 +358,27 @@
 							width: 110,
 							title: '操作',
 							action: true,
-							plugins: [{
-								icon: 'el-icon-edit',
-								name: '查看',
-								audit: '',
-								event: {
-									click: (item : any) => {
-										(this as any).openEdit(item)
+							plugins: [
+								{
+									icon: 'el-icon-edit',
+									name: '查看',
+									audit: '',
+									event: {
+										click: (item : any) => {
+											(this as any).openEdit(item)
+										}
 									}
-								}
-							}, {
-								name: '拆单',
-								event: {
-									show: (item : any) => {
-										return item.isMaster === 1
-									},
-									click: (item : any) => (this as any).orderTaking(item)
-								}
-							}]
+								},
+								{
+									name: '拆单',
+									event: {
+										show: (item : any) => {
+											return item.isMaster === 1
+										},
+										click: (item : any) => (this as any).orderTaking(item)
+									}
+								},
+							]
 						}
 					]
 				}
@@ -713,7 +716,6 @@
 		// 刷新
 		onRefresh(e : string) {
 			(this as any).$refs.bill.$refs[e].resert();
-			this.getPageList({ pageSize: 20, pageNo: 1 }, 'all'); // 综合数据
 		}
 	}
 </script>

+ 1 - 1
src/views/audit/warehousing/index.vue

@@ -693,7 +693,7 @@
 		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
-			e.realityPrice = e.number * e.unitPrice;
+			e.realityPrice = parseFloat((e.number * e.unitPrice).toFixed(2));
 			e.totalPrice = e.realityPrice - e.prePrice;
 		}
 		// 确定商品新增