ymy vor 1 Jahr
Ursprung
Commit
44e6daa413

+ 2 - 1
src/benyun/components/byDatePicker/byDatePicker.vue

@@ -9,6 +9,7 @@
     :editable="attrs.editable?false:true"
     :format="attrs.format"
     :align="attrs.align"
+    :picker-options="attrs.pickerOptions"
     @change="onChange"
   >
   </el-date-picker>
@@ -26,7 +27,7 @@
       placeholder:''  //占位符
       format:''  格式
       align: left, center, right  //对齐方式
-
+      pickerOptions:{} //快捷选项
     }
   }
 

+ 6 - 1
src/benyun/utils/auth.ts

@@ -5,7 +5,12 @@ const TokenKey = 'AdminOMS-Token'
 const ExpiresInKey = 'AdminOMS-Expires-In'
 
 export function getToken() {
-  return Cookies.get(TokenKey)
+  if(process.env.NODE_ENV === 'development'){
+    return 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImUxMGZiNGE5LThjNjctNDRmNS04MmVlLTA3ZmEzNGRmZjEzMyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.ZboNvSMNW-WCwU2e_2nqr7GBXdMbr27wapnmRtxz8_YQGHFCQX3chOFIg80qEl3i47gNtceAXaNFwKfb1Gmh6Q'
+  }else{
+    return Cookies.get(TokenKey)
+  }
+  
 }
 
 export function setToken(token:string) {

+ 2 - 0
src/main.ts

@@ -176,3 +176,5 @@ function unitVue() {
 }
 
 omsLogin()
+
+

+ 2 - 2
src/permission.ts

@@ -41,8 +41,8 @@ router.beforeEach((to:any, from:any, next:any) => {
   // let params = getQueryObject();
   // const ticket = params.ticket;
   // const ssoToken = params.ssoToken;
-
-  if (getToken()) {
+  const token  = getToken();
+  if (token) {
     to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
     /* has token*/
     // if (to.path === '/login') {

+ 6 - 3
src/views/audit/depots/components/ruleForm.vue

@@ -142,7 +142,10 @@
 			}],
 			address: [{
 				required: true, message: '请输入详细地址', trigger: 'blur'
-			}]
+			}],
+			// street:[{
+			// 	required: true, message: '请选择仓库地址', trigger: 'change'
+			// }]
 		};
 		parentValue: any = {
 			province: null,
@@ -186,10 +189,10 @@
 					resolve(true)
 				}
 				(this as any).$refs.ruleForm.validate((valid:any) => {
-					if (valid && (this as any).parentValue.provinceCode) {
+					if (valid && (this as any).parentValue.streetCode) {
 						resolve(true)
 					} else {
-						if(!(this as any).parentValue.provinceCode){
+						if(!(this as any).parentValue.streetCode){
 							(this as any).byAreaSlot = true;
 							(this as any).$message({
 								message: '验证未通过,请检查!',

+ 15 - 4
src/views/audit/depots/index.vue

@@ -5,7 +5,7 @@
 				@resert="getDataList" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 			<!-- 注册/编辑弹窗 -->
-			<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="960px" height="450px">
+			<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="960px" height="450px" v-loading="load">
 				<!-- <by-form :propConfig="addConfig" ref="addFormId"></by-form> -->
 				<ruleForm ref='addFormId' @toCargoOwner="toCargoOwner"></ruleForm>
 				<div slot="footer" class="dialog-footer">
@@ -44,6 +44,7 @@
 	import Assembly from "@/components/Assembly/yesno.vue";
 	@Component({ components: { ruleForm } })
 	export default class Depots extends Vue {
+		load:boolean = false;
 		isShow : any = 'ckb'
 		timeNum = 0;
 		timer : any = null
@@ -347,7 +348,7 @@
 					address: [{
 						required: true, message: '请输入详细地址', trigger: 'blur'
 					}],
-					province: [{
+					street: [{
 						required: true, message: '请选择仓库地址', trigger: 'change'
 					}],
 				}
@@ -521,9 +522,11 @@
 					}
 					// console.log(query);
 					if (this.popTitle === '注册') {
+						this.load = true;
 						let loading = this.$loading({ target: '.main-container' });
 						api.saveList(query, 'maindataStorehouse').then((res : any) => {
 							loading.close();
+							this.load = false;
 							if (res.code === 200) {
 								this.dialogFormVisible = false;
 								// this.$message.success(this.popTitle + '成功');
@@ -555,17 +558,25 @@
 									}).catch(() => {});
 								// });
 							} else this.$message.error(res.msg)
-						}).catch(() => loading.close());
+						}).catch(() => {
+							this.load = false;
+							loading.close()
+						});
 					} else if (this.popTitle === '编辑') {
+						this.load = true;
 						let loading = this.$loading({ target: '.main-container' });
 						api.updateList(query, 'maindataStorehouse').then((res : any) => {
+							this.load = false;
 							loading.close();
 							if (res.code === 200) {
 								this.dialogFormVisible = false;
 								this.$message.success(this.popTitle + '成功');
 								this.getDataList();
 							} else this.$message.error(res.msg)
-						}).catch(() => loading.close());
+						}).catch(() => {
+							this.load = false;
+							loading.close();
+						});
 					}
 				}).catch(() => {});
 			}

+ 3 - 3
src/views/audit/manufacturer/index.vue

@@ -205,9 +205,9 @@
 					name: [{
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
-					// organizationCode: [{
-					// 	required: true, message: '请输入机构代码', trigger: 'blur'
-					// }],
+					organizationCode: [{
+						required: true, message: '请输入机构代码', trigger: 'blur'
+					}],
 					contacts: [{
 						required: true, message: '请输入负责人', trigger: 'blur'
 					}],

+ 9 - 5
src/views/audit/orderTask/components/productModal.vue

@@ -1,6 +1,6 @@
 <template>
 	<vxe-modal v-model="value" id="productDialogModal" :width="width?width+'px':'90%'" @show="show"
-		:height="height?height+'px':'90%'" show-zoom resize transfer show-footer
+		:height="height?height+'px':'90%'" show-zoom resize transfer show-footer v-loading="loading"
 		@confirm="confirm">
 		<template #title>
 			<span>选择商品</span>
@@ -20,7 +20,7 @@
 		time : any;
 		timeNum = 0;
 		data : Array<any> = []
-
+		loading:boolean = false;
 		@Prop()
 		width ?: number
 
@@ -135,9 +135,9 @@
 		//显示弹窗
 		show() {
 			if (this.data.length == 0) {
-				this.time = setInterval(() => {
+				this.$nextTick(()=>{
 					this.getList()
-				}, 500)
+				})
 			}
 			if (this.$refs.view) {
 				(this.$refs.view as any).clearCheckboxRow();
@@ -154,11 +154,13 @@
 			clearInterval(this.time)
 			let query : any = (this.$refs.view as any).getQuery();
 			query.isLikeSearch = '1';
+			this.loading = true;
 			(this as any).$request({
 				url: '/maindata/maindataMaterialSku/page',
 				method: 'get',
 				params: query
 			}).then((res : any) => {
+				this.loading = false;
 				if (res.data.records) {
 					(this.$refs.view as any).setTableValue(res.data.records);
 					this.data = res.data.records;
@@ -169,7 +171,9 @@
 					};
 					(this.$refs.view as any).setPage(page)
 				}
-			}).catch(() => {});
+			}).catch(() => {
+				this.loading = false;
+			});
 		}
 	}
 </script>

+ 8 - 0
src/views/audit/orderTask/index.vue

@@ -113,6 +113,11 @@
 									attr: {
 										format: 'yyyy-MM-dd HH:mm:ss',
 										type: 'datetime',
+										pickerOptions:{
+											disabledDate(time:any) {
+												return time.getTime() < Date.now();
+											},
+										}
 									},
 								}
 							},
@@ -904,6 +909,9 @@
 						v.taskOrderId = query.id;
 					}
 				};
+				if(new Date() >= new Date(query.deliveryData)) {
+					return this.$message.warning('交货时间不能小于当前时间!');  
+				}
 				// 表格删除
 				query.suborderList.map((v : any, i : any) => {
 					if (v.isDeleted === 1 && !v.id) {

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

@@ -279,6 +279,9 @@
 					],
 					barCode: [
 						{ required: true, message: '请输入69码-商品条码'}
+					],
+					unit: [
+						{ required: true, message: '请输入单位'}
 					]
 				}
 			},
@@ -369,7 +372,7 @@
 				},
 				{
 					width: 90,
-					title: '单位',
+					title: '单位(必填项)',
 					field: 'unit',
 					component: 'by-input',
 					compConfig: {

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

@@ -558,17 +558,17 @@
 										}
 									}
 								},
-								{
-									name: '编辑',
-									event: {
-										show: (item : any) => {
-											return item.status === 0
-										},
-										click: (item : any) => {
-											(this as any).openEdit(item)
-										}
-									}
-								},
+								// {
+								// 	name: '编辑',
+								// 	event: {
+								// 		show: (item : any) => {
+								// 			return item.status === 0
+								// 		},
+								// 		click: (item : any) => {
+								// 			(this as any).openEdit(item)
+								// 		}
+								// 	}
+								// },
 								{
 									name: '拆单',
 									event: {
@@ -965,15 +965,14 @@
 						v.compConfig.attr.readonly = true;
 					})
 					billConfig.form.columns[1][0].compConfig.attr.readonly = true;
-					if (parentData.status === 0) {
-						billConfig.form.columns[0][2].compConfig.attr.readonly = false;
-						billConfig.form.columns[0][3].compConfig.attr.readonly = false;
-						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 };
-					};
-					// console.log(parentData.suborderList);
+					// if (parentData.status === 0) {
+					// 	billConfig.form.columns[0][2].compConfig.attr.readonly = false;
+					// 	billConfig.form.columns[0][3].compConfig.attr.readonly = false;
+					// 	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 };
+					// };
 					(this.$refs.bill as any).setBillConfig(billConfig);
 					(this.$refs.bill as any).setBillFormValue(parentData); // 设置单据表单数据
 					(this.$refs.bill as any).setBillTableValue(parentData.suborderList, 0);// 设置第1张单据表格数据

+ 1 - 1
src/views/audit/store/components/deliveryGoodsInfo.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="info">
     <div class="edit" v-if="!readOnly">
-      <span @click="edit">编辑</span>
+      <span @click="edit">发货设置</span>
     </div>
     <div class="g-box">
       <div class="info-row" v-if="!hideOrderCode">

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

@@ -135,8 +135,9 @@ export default class SynchronousProduct extends Vue {
     data.pageNo = 1;
     this.getList(data);
   }
-  pagination(){
-    this.search();
+  pagination(page:any){
+    let data:any=(this.$refs.view as any).getQuery();
+    this.getList(data);
   }
   resert(){
     let data = (this.$refs.view as any).getPage();

+ 1 - 1
src/views/oms/B2BOrder/components/deliveryGoodsInfo.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="info">
     <div class="edit" v-if="!readOnly">
-      <span @click="edit">编辑</span>
+      <span @click="edit">发货设置</span>
     </div>
     <div class="g-box">
       <div class="info-row" v-if="!hideOrderCode">

+ 1 - 1
src/views/oms/B2BOrder/components/expressDeliveryModal.vue

@@ -8,7 +8,7 @@
     <div class="content">
       <div class="info">
         <div class="edit">
-          <span @click="edit">编辑</span>
+          <span @click="edit">发货设置</span>
         </div>
         <div class="g-box">
           <!-- <div class="info-row">

+ 1 - 1
src/views/oms/B2COrder/components/deliveryGoodsInfo.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="info">
     <div class="edit" v-if="!readOnly">
-      <span @click="edit">编辑</span>
+      <span @click="edit">发货设置</span>
     </div>
     <div class="g-box">
       <div class="info-row" v-if="!hideOrderCode">

+ 1 - 1
src/views/oms/B2COrder/components/expressDeliveryModal.vue

@@ -8,7 +8,7 @@
     <div class="content">
       <div class="info">
         <div class="edit">
-          <span @click="edit">编辑</span>
+          <span @click="edit">发货设置</span>
         </div>
         <div class="g-box">
           <!-- <div class="info-row">

+ 2 - 2
src/views/system/dept/index.vue

@@ -311,13 +311,13 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           } else {
             addDept(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           }
         }
       });

+ 6 - 6
src/views/system/dict/index.vue

@@ -84,7 +84,7 @@
           v-hasPermi="['system:dict:remove']"
         >删除</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -93,7 +93,7 @@
           @click="handleExport"
           v-hasPermi="['system:dict:export']"
         >导出</el-button>
-      </el-col>
+      </el-col> -->
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -297,7 +297,7 @@ export default {
         this.form = response.data;
         this.open = true;
         this.title = "修改字典类型";
-      });
+      }).catch(()=>{});
     },
     /** 提交按钮 */
     submitForm: function() {
@@ -308,13 +308,13 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           } else {
             addType(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           }
         }
       });
@@ -339,7 +339,7 @@ export default {
     handleRefreshCache() {
       refreshCache().then(() => {
         this.$modal.msgSuccess("刷新成功");
-      });
+      }).catch(()=>{});
     }
   }
 };

+ 10 - 5
src/views/system/logininfor/index.vue

@@ -73,7 +73,7 @@
           v-hasPermi="['system:logininfor:remove']"
         >清空</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -82,7 +82,7 @@
           @click="handleExport"
           v-hasPermi="['system:logininfor:export']"
         >导出</el-button>
-      </el-col>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -155,12 +155,17 @@ export default {
     /** 查询登录日志列表 */
     getList() {
       this.loading = true;
-      list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      let params = this.queryParams ? this.queryParams : {};
+      params.beginTime = this.dateRange[0];
+      params.endTime = this.dateRange[1];
+      list(this.addDateRange(params)).then(response => {
           this.list = response.rows;
           this.total = response.total;
           this.loading = false;
         }
-      );
+      ).catch(()=>{
+        this.loading = false;
+      });
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -170,7 +175,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.resetForm("queryForm");
+      this.resetForm("queryForm",this);
       this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
       this.handleQuery();
     },

+ 2 - 2
src/views/system/menu/index.vue

@@ -428,13 +428,13 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           } else {
             addMenu(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           }
         }
       });

+ 10 - 5
src/views/system/operlog/index.vue

@@ -88,7 +88,7 @@
           v-hasPermi="['system:operlog:remove']"
         >清空</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -97,7 +97,7 @@
           @click="handleExport"
           v-hasPermi="['system:operlog:export']"
         >导出</el-button>
-      </el-col>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -234,12 +234,17 @@ export default {
     /** 查询登录日志 */
     getList() {
       this.loading = true;
-      list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
+      let params = this.queryParams ? this.queryParams : {};
+      params.beginTime = this.dateRange[0];
+      params.endTime = this.dateRange[1];
+      list(this.addDateRange(params)).then( response => {
           this.list = response.rows;
           this.total = response.total;
           this.loading = false;
         }
-      );
+      ).catch(()=>{
+        this.loading = false;
+      });
     },
     // 操作日志类型字典翻译
     typeFormat(row, column) {
@@ -253,7 +258,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
-      this.resetForm("queryForm");
+      this.resetForm("queryForm", this);
       this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
       this.handleQuery();
     },

+ 4 - 4
src/views/system/role/index.vue

@@ -84,7 +84,7 @@
           v-hasPermi="['system:role:remove']"
         >删除</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -93,7 +93,7 @@
           @click="handleExport"
           v-hasPermi="['system:role:export']"
         >导出</el-button>
-      </el-col>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -570,14 +570,14 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           } else {
             this.form.menuIds = this.getMenuAllCheckedKeys();
             addRole(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           }
         }
       });

+ 12 - 9
src/views/system/user/index.vue

@@ -112,7 +112,7 @@
               v-hasPermi="['system:user:remove']"
             >删除</el-button>
           </el-col>
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-button
               type="info"
               plain
@@ -131,7 +131,7 @@
               @click="handleExport"
               v-hasPermi="['system:user:export']"
             >导出</el-button>
-          </el-col>
+          </el-col> -->
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
 
@@ -471,18 +471,21 @@ export default {
     /** 查询用户列表 */
     getList() {
       this.loading = true;
-      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      let params = this.queryParams ? this.queryParams : {};
+      params['params[beginTime]'] = this.dateRange[0];
+      params['params[endTime]'] = this.dateRange[1];
+      listUser(this.addDateRange(params)).then(response => {
           this.userList = response.rows;
           this.total = response.total;
           this.loading = false;
         }
-      );
+      ).catch(()=>{});
     },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {
         this.deptOptions = response.data;
-      });
+      }).catch(()=>{});
     },
     // 筛选节点
     filterNode(value, data) {
@@ -568,7 +571,7 @@ export default {
         this.open = true;
         this.title = "添加用户";
         this.form.password = this.initPassword;
-      });
+      }).catch(()=>{});
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -584,7 +587,7 @@ export default {
         this.open = true;
         this.title = "修改用户";
         this.form.password = "";
-      });
+      }).catch(()=>{});
     },
     /** 重置密码按钮操作 */
     handleResetPwd(row) {
@@ -614,13 +617,13 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           } else {
             addUser(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
-            });
+            }).catch(()=>{});
           }
         }
       });