Browse Source

5.22机构名称合并

AlanWong 2 years ago
parent
commit
b961acd9fc

+ 2 - 1
src/api/order.ts

@@ -42,10 +42,11 @@ function deleteList(data : any, url : any) {
 	})
 }
 // 回收站数据
-function selectDeleteList(url : any) {
+function selectDeleteList(data : any, url : any) {
 	return request({
 		url: '/supply/' + url + '/selectDeleteList',
 		method: 'GET',
+		params: data
 	})
 }
 // 接单

+ 22 - 4
src/views/audit/agencyGoods/index.vue

@@ -2,14 +2,14 @@
 	<div class="my-container">
 		<div class="bill-left">
 			<div class="bill-tab">
-				<div class="title">导航</div>
+				<div class="tab-title">导航</div>
 				<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props"
 					@node-click="handleNodeClick"></el-tree>
 			</div>
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -39,6 +39,7 @@
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	export default class AgencyGoods extends Vue {
+		loading : any = null
 		// 左边
 		data : any = []
 		expandedKeys : any = []
@@ -187,6 +188,7 @@
 								clearable: true,
 								retConfig: {
 									parentId: 'id',
+									parentName: 'name',
 								},
 								defaultExpandAll: true
 							},
@@ -310,7 +312,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
@@ -416,6 +417,23 @@
 				}
 			})
 		}
+		// 刷新
+		onRefresh(){
+			this.loading = this.$loading({ target: '.main-container' });
+			(this as any).$refs.moduleView.clearSearch();
+			api.pageList({}, 'maindataMaterialOrganizationCategory').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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';
@@ -460,7 +478,7 @@
 				overflow: hidden;
 			}
 
-			.title {
+			.tab-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;

+ 19 - 2
src/views/audit/attribute/index.vue

@@ -2,7 +2,7 @@
 	<div class="my-container">
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="getDataList">
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -60,6 +60,7 @@
 	export default class Attribute extends Vue {
 		// 右边
 		baseURL : any = process.env.VUE_APP_BASE_API
+		loading : any = null
 		norms : any = ''
 		normsValue : any = ''
 		timeNum = 0;
@@ -341,7 +342,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
@@ -424,6 +424,23 @@
 				});
 			});
 		}
+		// 刷新
+		onRefresh(){
+			this.loading = this.$loading({ target: '.main-container' });
+			(this as any).$refs.moduleView.clearSearch();
+			api.pageList({}, 'maindataMaterialAttribute').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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';

+ 18 - 11
src/views/audit/brand/index.vue

@@ -2,7 +2,7 @@
 	<div class="my-container">
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="getDataList">
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -201,15 +201,6 @@
 			]
 		}
 		mounted() {
-			// this.loading = this.$loading({
-			// 	target:'bill-main',
-			// 	lock: true,
-			// 	text: 'Loading',
-			// 	spinner: 'el-icon-loading',
-			// });
-			// setTimeout(() => {
-			// 	this.loading.close();
-			// },3000)
 			this.timer = setInterval(() => {
 				this.getDataList()
 			}, 300)
@@ -266,7 +257,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
@@ -342,6 +332,23 @@
 				this.$message.info('已取消删除');
 			});
 		}
+		// 刷新
+		onRefresh(){
+			this.loading = this.$loading({ target: '.main-container' });
+			(this as any).$refs.moduleView.clearSearch();
+			api.pageList({}, 'maindataMaterialBrand').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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';

+ 18 - 0
src/views/audit/orderTask/components/focus.vue

@@ -0,0 +1,18 @@
+<template>
+	<div>
+		<el-input placeholder="请选择机构名称" @focus="getFocus($event)"></el-input>
+	</div>
+</template>
+
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	@Component
+	export default class Focus extends Vue {
+		getFocus(e : any) {
+			console.log(e,'666');
+		}
+	}
+</script>
+
+<style>
+</style>

+ 162 - 140
src/views/audit/orderTask/index.vue

@@ -4,7 +4,10 @@
 			@onDispatch="onDispatch" @onRefresh="onRefresh" @detail="openEdit" @onSave="onSave" @clickTab="clickTab"
 			@onChangeRow="onChangeRow" @pagination="pagination">
 		</by-bill>
+		<!-- 选择物料 -->
 		<productModal ref="product" :mulit="true" @confirm="confirmProduct" />
+		<!-- 选择机构名称 -->
+		<!-- <supplierModal /> -->
 	</div>
 </template>
 
@@ -13,10 +16,11 @@
 	import api from "@/api/order";
 	import Assembly from "@/components/Assembly/order.vue";
 	import productModal from "./components/productModal.vue";
-	@Component({ components: { productModal } })
+	import Focus from "./components/focus.vue";
+	@Component({ components: { productModal,Focus } })
 	export default class OrderTask extends Vue {
 		// 左边
-		tabType : any = 'all';
+		tabType : any = 'bill';
 		isAdd : any = false
 		// 右边
 		tableData : any = []
@@ -26,7 +30,7 @@
 		timer : any = null
 		config : any = {
 			attr: {
-				activeName: 'all'
+				activeName: 'bill'
 			},
 			// 单据
 			bill: {
@@ -52,15 +56,15 @@
 						[
 							{
 								span: 8,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 							},
 							{
 								span: 8,
-								label: '单据编号',
-								prop: 'orderNumber',
-								component: 'by-input',
+								label: '机构名称',
+								prop: 'organizationName',
+								component: Focus,
 							},
 							{
 								span: 8,
@@ -166,6 +170,7 @@
 									compConfig: {
 										attr: {
 											size: 'mini',
+											type: 'number',
 										},
 									}
 								},
@@ -183,7 +188,7 @@
 										attr: {
 											size: 'mini',
 											type: 'number',
-											defaultValue: 0,
+											defaultValue: '0',
 										},
 									}
 								},
@@ -203,7 +208,6 @@
 										event: {
 											click: (item : any) => {
 												(this as any).changeTable(item)
-
 											}
 										}
 									}]
@@ -223,27 +227,27 @@
 						[
 							{
 								span: 6,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入机构名称',
+										placeholder: '请输入单据编号',
 										clearable: true
-									},
-								},
+									}
+								}
 							},
 							{
 								span: 6,
-								label: '单据编号',
-								prop: 'orderNumber',
+								label: '机构名称',
+								prop: 'organizationName',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入单据编号',
+										placeholder: '请输入机构名称',
 										clearable: true
-									}
-								}
+									},
+								},
 							},
 							{
 								span: 6,
@@ -294,15 +298,15 @@
 					},
 					columns: [
 						{
-							width: 200,
-							title: '机构名称',
-							field: 'organizationName',
+							width: 168,
+							title: '单据编号',
+							field: 'orderNumber',
 							isDetail: true,
 						},
 						{
-							width: 150,
-							title: '单据编号',
-							field: 'orderNumber',
+							width: 180,
+							title: '机构名称',
+							field: 'organizationName',
 						},
 						{
 							width: 80,
@@ -368,27 +372,27 @@
 						[
 							{
 								span: 6,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入机构名称',
+										placeholder: '请输入单据编号',
 										clearable: true
-									},
-								},
+									}
+								}
 							},
 							{
 								span: 6,
-								label: '单据编号',
-								prop: 'orderNumber',
+								label: '机构名称',
+								prop: 'organizationName',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入单据编号',
+										placeholder: '请输入机构名称',
 										clearable: true
-									}
-								}
+									},
+								},
 							},
 							{
 								span: 6,
@@ -440,15 +444,15 @@
 					},
 					columns: [
 						{
-							width: 200,
-							title: '机构名称',
-							field: 'organizationName',
+							width: 168,
+							title: '单据编号',
+							field: 'orderNumber',
 							isDetail: true,
 						},
 						{
-							width: 150,
-							title: '单据编号',
-							field: 'orderNumber',
+							width: 180,
+							title: '机构名称',
+							field: 'organizationName',
 						},
 						{
 							width: 80,
@@ -514,27 +518,27 @@
 						[
 							{
 								span: 6,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入机构名称',
+										placeholder: '请输入单据编号',
 										clearable: true
-									},
-								},
+									}
+								}
 							},
 							{
 								span: 6,
-								label: '单据编号',
-								prop: 'orderNumber',
+								label: '机构名称',
+								prop: 'organizationName',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入单据编号',
+										placeholder: '请输入机构名称',
 										clearable: true
-									}
-								}
+									},
+								},
 							},
 							{
 								span: 6,
@@ -587,15 +591,15 @@
 					},
 					columns: [
 						{
-							width: 200,
-							title: '机构名称',
-							field: 'organizationName',
+							width: 168,
+							title: '单据编号',
+							field: 'orderNumber',
 							isDetail: true,
 						},
 						{
-							width: 150,
-							title: '单据编号',
-							field: 'orderNumber',
+							width: 180,
+							title: '机构名称',
+							field: 'organizationName',
 						},
 						{
 							width: 80,
@@ -661,27 +665,27 @@
 						[
 							{
 								span: 6,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入机构名称',
+										placeholder: '请输入单据编号',
 										clearable: true
-									},
-								},
+									}
+								}
 							},
 							{
 								span: 6,
-								label: '单据编号',
-								prop: 'orderNumber',
+								label: '机构名称',
+								prop: 'organizationName',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入单据编号',
+										placeholder: '请输入机构名称',
 										clearable: true
-									}
-								}
+									},
+								},
 							},
 							{
 								span: 6,
@@ -731,15 +735,15 @@
 					},
 					columns: [
 						{
-							width: 200,
-							title: '机构名称',
-							field: 'organizationName',
+							width: 168,
+							title: '单据编号',
+							field: 'orderNumber',
 							isDetail: true,
 						},
 						{
-							width: 150,
-							title: '单据编号',
-							field: 'orderNumber',
+							width: 180,
+							title: '机构名称',
+							field: 'organizationName',
 						},
 						{
 							width: 80,
@@ -797,11 +801,39 @@
 				this.getDataList()
 			}, 500)
 		}
+		getFocus(e:any){
+			console.log(e);
+		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
 			e.realityPrice = e.number * e.unitPrice;
 			e.totalPrice = e.realityPrice - e.prePrice;
 		}
+		// 确定商品新增
+		confirmProduct(e : any) {
+			let contents = '', goodsData = e;
+			goodsData = goodsData.map((item : any) => {
+				item.materialName = item.skuTitle
+				item.prePrice = 0
+				// item.materialId = item.materialId
+				item.unitPrice = item.price
+				item.materialSku = item.id
+				const { id, ...newData } = item
+				// const { skuTitle, price, id, materialId, ...newData } = item
+				return newData
+			})
+			this.tableData = this.tableData.concat(goodsData);
+			console.log('this.tableData ==> ', this.tableData);
+			this.tableData.map((v : any, i : any) => {
+				v.dataIndex = i
+			});
+			if (contents) {
+				this.$alert('商品id' + contents + '已存在!', '提示', {
+					confirmButtonText: '确定',
+				});
+			};
+			(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
+		}
 		// 保存
 		onSave(e : any) {
 			console.log('保存 ==>', this.tabType);
@@ -820,6 +852,7 @@
 						v.splice(i, 1)
 					}
 				});
+				if (query.deliveryData) query.deliveryData = query.deliveryData + ' 00:00:00';
 				if (this.isAdd) {
 					query.submitState = 0
 					console.log('保存进草稿箱 ==>', query);
@@ -848,29 +881,6 @@
 			})
 
 		}
-		// 确定商品新增
-		confirmProduct(e : any) {
-			let contents = '', goodsData = e;
-			goodsData = goodsData.map((item : any) => {
-				item.materialName = item.skuTitle
-				item.materialId = item.materialId
-				item.unitPrice = item.price
-				item.materialSku = item.id
-				const { skuTitle, price, id, materialId, ...newData } = item
-				return newData
-			})
-			this.tableData = this.tableData.concat(goodsData);
-			this.tableData.map((v : any, i : any) => {
-				v.dataIndex = i
-			});
-			if (contents) {
-				this.$alert('商品id' + contents + '已存在!', '提示', {
-					confirmButtonText: '确定',
-				});
-			};
-			console.log('this.tableData ==> ', this.tableData);
-			(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
-		}
 		// 打开新增
 		onAdd(e : any) {
 			console.log('新增 ==>', e);
@@ -884,7 +894,11 @@
 				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 				billConfig.form.attr.readonly = false; // 设置只读
 				billConfig.tool.tools = { save: true, };
-				if (e === 'all') billConfig.tool.tools = { save: true, smt: true };
+				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);
@@ -905,6 +919,7 @@
 				let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
 				billConfig.form.attr.readonly = false; // 设置只读
 				billConfig.tool.tools = { save: true, };
+				if (this.tabType === 'draftsBox') billConfig.tool.tools = { save: true, smt: true };
 				billConfig.tableConfig[0].tool.tools = { add: true };
 				this.tableData = data;
 				(this.$refs.bill as any).setBillConfig(billConfig);
@@ -921,7 +936,9 @@
 			let readonly = (this as any).$lodash.cloneDeep(this.config.bill);
 			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);
 			(this.$refs.bill as any).setBillFormValue(e);// 设置单据表单数据
@@ -937,29 +954,29 @@
 		// 提交
 		onSmt(e : any) {
 			console.log('提交 ==>', e);
-			// (this as any).$refs.bill.$refs.billForm.validate().then(() => {
-			// 	let query = (this as any).$refs.bill.$refs.billForm.getValue();
-			// 	api.saveList(query, 'supplyTaskOrder').then((res : any) => {
-			// 		if (res.code === 200) {
-			// 			this.$message({
-			// 				type: 'success',
-			// 				message: '提交成功!'
-			// 			});
-			// 			this.getDataList();
-			// 			(this.$refs.bill as any).showTab = 'all';
-			// 			(this.$refs.bill as any).setBillFormValue({});
-			// 		} else this.failHandle(res)
-			// 	})
-			// })
+			(this as any).$refs.bill.$refs.billForm.validate().then(() => {
+				let query = (this as any).$refs.bill.$refs.billForm.getValue();
+				if (this.tabType === 'all') {
+					// api.saveList(query, 'supplyTaskOrder').then((res : any) => {
+					// 	if (res.code === 200) {
+					// 		this.$message.success('提交成功');
+					// 		this.getDataList();
+					// 		(this.$refs.bill as any).showTab = 'all';
+					// 		(this.$refs.bill as any).setBillFormValue({});
+					// 	} else this.failHandle(res)
+					// })
+				}
+			})
 		}
 		// 切换tab栏
 		clickTab(e : any) {
 			console.log('切换tab ==> ', e);
 			this.tabType = e;
 			// submitState: 提交状态
+			if (e === 'all') this.getPageList({ pageSize: 10, pageNo: 1 }, 'all'); // 草稿箱数据
 			if (e === 'draftsBox') this.getPageList({ submitState: 0 }, 'draftsBox'); // 草稿箱数据
 			if (e === 'smt') this.getPageList({ submitState: 1 }, 'smt'); // 已提交数据
-			if (e === 'recycleBin') this.getSelectDeleteList('supplyTaskOrder'); // 回收站数据
+			if (e === 'recycleBin') this.getSelectDeleteList({ pageNo: 1, pageSize: 10 }); // 回收站数据
 		}
 		// 初始化
 		getDataList() {
@@ -971,21 +988,32 @@
 				return
 			}
 			clearInterval(this.timer)
-			this.getPageList({pageSize:10,pageNo:1}, 'all'); // 综合数据
+			this.getPageList({ pageSize: 10, pageNo: 1 }, 'all'); // 综合数据
 		}
 		// 分页
-		pagination(e:any){
+		pagination(e : any) {
+			console.log('分页 ==> ', e);
 			let query = {
-				pageNo:e.page.pageNum,
-				pageSize:e.page.pageSize,
+				pageNo: e.page.pageNum,
+				pageSize: e.page.pageSize,
 			};
-			let loading = this.$loading({ target: '.main-container' })
-			api.pageList(query, 'supplyTaskOrder').then((res : any) => {
-				if (res.code === 200) {
-					(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
-					loading.close()
-				} else this.failHandle(res)
-			})
+			let loading = this.$loading({ target: '.main-container' });
+			if (e.type === 'recycleBin') {
+				api.selectDeleteList(query, 'supplyTaskOrder').then((res : any) => {
+					if (res.code === 200) {
+						(this.$refs.bill as any).setTabTableValue('recycleBin', res.data.records);
+						loading.close()
+					} else this.failHandle(res)
+				});
+			} else {
+				api.pageList(query, 'supplyTaskOrder').then((res : any) => {
+					if (res.code === 200) {
+						(this.$refs.bill as any).setTabTableValue(e.type, res.data.records);
+						loading.close()
+					} else this.failHandle(res)
+				})
+			}
+
 		}
 		// 获取分页数据
 		getPageList(query : any, type : any) {
@@ -1002,10 +1030,10 @@
 			})
 		}
 		// 回收站数据
-		getSelectDeleteList(url : any) {
-			api.selectDeleteList(url).then((res : any) => {
+		getSelectDeleteList(query : any) {
+			api.selectDeleteList(query, 'supplyTaskOrder').then((res : any) => {
 				if (res.code === 200) {
-					(this.$refs.bill as any).setTabTableValue('recycleBin', res.data);
+					(this.$refs.bill as any).setTabTableValue('recycleBin', res.data.records);
 					let page = {
 						pageNo: res.data.current, //当前页
 						pageSize: res.data.size, //每页条数
@@ -1030,7 +1058,7 @@
 			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('supplyTaskOrder') // 回收站数据
+			if (e === 'recycleBin') this.getSelectDeleteList({}) // 回收站数据
 		}
 		// 单据表格删除
 		changeTable(item : any) {
@@ -1045,16 +1073,8 @@
 				console.log('原表格数据 ==> ', this.tableData);
 				console.log('新表格数据 ==> ', newData);
 				(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
-				this.$message({
-					type: 'success',
-					message: '删除成功!'
-				});
-			}).catch(() => {
-				this.$message({
-					type: 'info',
-					message: '已取消删除'
-				});
-			});
+				this.$message.success('删除成功');
+			}).catch(() => this.$message.info('已取消删除'));
 		}
 		// 工具栏删除
 		onDelete(e : any) {
@@ -1075,7 +1095,8 @@
 			}).then(() => {
 				api.deleteList({ ids: ids }, 'supplyTaskOrder').then((res : any) => {
 					if (res.code === 200) {
-						this.getDataList();
+						// this.getDataList();
+						this.clickTab(this.tabType);
 						this.$message.success('删除成功!');
 					} else this.failHandle(res)
 				})
@@ -1092,7 +1113,8 @@
 			}).then(() => {
 				api.deleteList({ ids: item.id }, 'supplyTaskOrder').then((res : any) => {
 					if (res.code === 200) {
-						this.getDataList();
+						// this.getDataList();
+						this.clickTab(this.tabType);
 						this.$message.success('删除成功!');
 					} else this.failHandle(res)
 				})

+ 21 - 4
src/views/audit/productClassification/index.vue

@@ -2,14 +2,14 @@
 	<div class="my-container">
 		<div class="bill-left">
 			<div class="bill-tab">
-				<div class="title">导航</div>
+				<div class="tab-title">导航</div>
 				<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props"
 					@node-click="handleNodeClick"></el-tree>
 			</div>
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit"  @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -33,6 +33,7 @@
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	export default class ProductClassification extends Vue {
+		loading : any = null
 		// 左边
 		data : any = []
 		expandedKeys : any = []
@@ -310,7 +311,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
@@ -417,6 +417,23 @@
 				}
 			})
 		}
+		// 刷新
+		onRefresh(){
+			this.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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';
@@ -461,7 +478,7 @@
 				overflow: hidden;
 			}
 
-			.title {
+			.tab-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;

+ 38 - 18
src/views/audit/productManagement/index.vue

@@ -10,7 +10,7 @@
 			</div>
 			<div class="bill-main" v-show="isShow==='home'" key="item2">
 				<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-					@resert="getDataList" @clickHandle="clickHandle" @detail="getDetail" />
+					@resert="getDataList" @clickHandle="clickHandle" @detail="getDetail" @onRefresh="onRefresh" />
 			</div>
 			<!-- 新增 -->
 			<div class="detil" v-show="isShow==='add'" key="item3">
@@ -109,6 +109,7 @@
 	import SynchronousOrderModal from "./components/synchronousOrderModal.vue";
 	@Component({ components: { ForTab, ImportProduct, SynchronousOrderModal } })
 	export default class productManagement extends Vue {
+		loading : any = null
 		tagsData : any = [] // 标签值
 		isShow = 'home'
 		isEdit = true
@@ -140,6 +141,17 @@
 		attributeId : any = ''
 		intercept : any = ''
 		// tab
+		props = {
+			label: 'name',
+			value: 'id',
+			children: 'children'
+		}
+		toolConfig = {
+			tools: {
+				return: true,
+				save: true,
+			}
+		}
 		singleTable : any = {
 			attr: {
 				size: 'mini',
@@ -476,17 +488,6 @@
 				}
 			]
 		}
-		props = {
-			label: 'name',
-			value: 'id',
-			children: 'children'
-		}
-		toolConfig = {
-			tools: {
-				return: true,
-				save: true,
-			}
-		}
 		formConfig = {
 			attr: {
 				size: 'small',
@@ -494,6 +495,9 @@
 					name: [{
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
+					basePrice: [{
+						required: true, message: '请输入基本售价', trigger: 'blur'
+					}],
 					categoryName: [{
 						required: true, message: '请输入物料分类', trigger: 'blur'
 					}],
@@ -502,7 +506,7 @@
 					}],
 					organizationCategoryName: [{
 						required: true, message: '请输入机构商品分类', trigger: 'blur'
-					}]
+					}],
 				}
 			},
 			columns: [
@@ -901,12 +905,12 @@
 		// 监听单表格数据
 		getSingleValue(e : any) {
 			// console.log('监听单表格 ==> ', e);
-			e.volume = e.length * e.width * e.height
+			e.volume = (e.length * e.width * e.height).toFixed(2);
 		}
 		// 监听表格数据
 		getInputValue(e : any) {
 			// console.log('监听表格 ==> ', e);
-			e.volume = e.length * e.width * e.height
+			e.volume = (e.length * e.width * e.height).toFixed(2);
 		}
 		// 保存编辑/新增
 		doFormData() {
@@ -995,7 +999,7 @@
 		getDetail(e : any) {
 			console.log('编辑 ==> ', e);
 			(this as any).$refs.byTool.setTool({ return: true, save: true, delete: true })
-			let loading = this.$loading({ target: '.my-container' })
+			this.loading = this.$loading({ target: '.my-container' })
 			api.single({ id: e.categoryId }, 'maindataMaterialCategory').then((res : any) => {
 				if (res.code === 200) e.categoryName = res.data.name
 			}).then(() => {
@@ -1058,7 +1062,7 @@
 								}
 							}
 							(this as any).$refs.form.setValue(e)
-							loading.close()
+							this.loading.close()
 						})
 					})
 				})
@@ -1446,7 +1450,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.doDelete();
 			if (e === 'onExport') this.onExport();
@@ -1554,6 +1557,23 @@
 				}
 			})
 		}
+		// 刷新
+		onRefresh() {
+			this.loading = this.$loading({ target: '.main-container' });
+			(this as any).$refs.moduleView.clearSearch();
+			api.pageList({}, 'maindataMaterialSku').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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';

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

@@ -37,6 +37,12 @@
 					},
 					columns: [
 						[
+							{
+								span: 8,
+								label: '单据编号',
+								prop: 'orderNumber',
+								component: 'by-input',
+							},
 							{
 								span: 8,
 								label: '机构名称',
@@ -45,8 +51,8 @@
 							},
 							{
 								span: 8,
-								label: '单编号',
-								prop: 'orderNumber',
+								label: '退单编号',
+								prop: 'chargebackNo',
 								component: 'by-input',
 							},
 							{
@@ -163,27 +169,27 @@
 						[
 							{
 								span: 6,
-								label: '机构名称',
-								prop: 'organizationName',
+								label: '单据编号',
+								prop: 'orderNumber',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入机构名称',
+										placeholder: '请输入单据编号',
 										clearable: true
-									},
-								},
+									}
+								}
 							},
 							{
 								span: 6,
-								label: '单据编号',
-								prop: 'orderNumber',
+								label: '机构名称',
+								prop: 'organizationName',
 								component: 'by-input',
 								compConfig: {
 									attr: {
-										placeholder: '请输入单据编号',
+										placeholder: '请输入机构名称',
 										clearable: true
-									}
-								}
+									},
+								},
 							},
 							{
 								span: 6,
@@ -242,22 +248,23 @@
 					},
 					columns: [
 						{
-							width: 200,
-							title: '机构名称',
-							field: 'organizationName',
+							width: 178,
+							title: '单据编号',
+							field: 'orderNumber',
 							isDetail: true,
 						},
 						{
-							// width: 180,
-							title: '单据编号',
-							field: 'orderNumber',
+							width: 180,
+							title: '机构名称',
+							field: 'organizationName',
 						},
 						{
-							// width: 180,
+							width: 178,
 							title: '退单编号',
 							field: 'chargebackNo',
 						},
 						{
+							width: 90,
 							title: '交货人',
 							field: 'delivery',
 						},
@@ -265,22 +272,19 @@
 							width: 120,
 							title: '联系方式',
 							field: 'deliveryPhone',
-							// compConfig: {
-							// 	attr: {
-							// 		size: 'mini',
-							// 		placeholder: ' ',
-							// 	},
-							// }
 						},
 						{
+							width: 150,
 							title: '交货时间',
 							field: 'deliveryData',
 						},
 						{
+							width: 150,
 							title: '交货地点',
 							field: 'deliveryAddress',
 						},
 						{
+							width: 120,
 							title: '交货方式',
 							field: 'deliveryWay',
 						},
@@ -396,8 +400,8 @@
 			})
 		}
 		// 回收站数据
-		getSelectDeleteList(url : any) {
-			api.selectDeleteList(url).then((res : any) => {
+		getSelectDeleteList(data : any) {
+			api.selectDeleteList(data,'supplyTaskOrder').then((res : any) => {
 				if (res.code === 200) {
 					(this.$refs.bill as any).setTabTableValue('recycleBin', res.data);
 					let page = {

+ 22 - 4
src/views/audit/virtually/index.vue

@@ -2,13 +2,13 @@
 	<div class="my-container">
 		<div class="bill-left">
 			<div class="bill-tab">
-				<div class="title">导航</div>
+				<div class="tab-title">导航</div>
 				<el-tree :data="data" node-key="id" :default-expanded-keys="expandedKeys" :props="props" @node-click="handleNodeClick"></el-tree>
 			</div>
 		</div>
 		<div class="bill-main">
 			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
-				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit">
+				@resert="getDataList" @clickHandle="clickHandle" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<!-- 新增/编辑弹窗 -->
@@ -32,6 +32,7 @@
 	import Assembly from "@/components/Assembly/material.vue";
 	@Component
 	export default class Virtually extends Vue {
+		loading : any = null
 		// 左边
 		data : any = []
 		expandedKeys : any = []
@@ -180,6 +181,7 @@
 								clearable: true,
 								retConfig: {
 									parentId: 'id',
+									parentName: 'name',
 								},
 								defaultExpandAll: true
 							},
@@ -305,7 +307,6 @@
 		}
 		// 工具栏方法
 		clickHandle(e : any) {
-			if (e === 'onRefresh') (this.$refs.moduleView as any).resert();
 			if (e === 'onAdd') this.onAdd();
 			if (e === 'onDelete') this.onDelete();
 			if (e === 'onExport') this.onExport();
@@ -411,6 +412,23 @@
 				}
 			})
 		}
+		// 刷新
+		onRefresh(){
+			this.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);
+			})
+		}
 		//导出
 		onExport() {
 			let urlArr = '/maindata/maindataMaterial';
@@ -455,7 +473,7 @@
 				overflow: hidden;
 			}
 
-			.title {
+			.tab-title {
 				font-size: 16px;
 				padding-bottom: 16px;
 				width: 200px;