瀏覽代碼

1,2,3,6,9,10号工单

逆水行舟 2 月之前
父節點
當前提交
9ac29dbca6

+ 136 - 127
src/api/currency.ts

@@ -1,168 +1,177 @@
-import request from '@/benyun/utils/request'
+import request from "@/benyun/utils/request";
 
 // 获取树形导航分类
-function treeList(url : any) {
-	return request({
-		url: '/maindata/' + url + '/treeList',
-		method: 'GET',
-	})
-	
+function treeList(url: any) {
+  return request({
+    url: "/maindata/" + url + "/treeList",
+    method: "GET",
+  });
 }
 // 树形查询不包含禁用
-function treeUseList(url : any) {
-	return request({
-		url: '/maindata/' + url + '/treeUseList',
-		method: 'GET',
-	})
+function treeUseList(url: any) {
+  return request({
+    url: "/maindata/" + url + "/treeUseList",
+    method: "GET",
+  });
 }
 // 通过父级id查子集
-function childrenTreeList(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/childrenTreeList',
-		method: 'GET',
-		params: data
-	})
+function childrenTreeList(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/childrenTreeList",
+    method: "GET",
+    params: data,
+  });
 }
 // 根据分类ID(数组)分页查询数据
-function byCategoryPage(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/ByCategoryPage',
-		method: 'GET',
-		params: data
-	})
+function byCategoryPage(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/ByCategoryPage",
+    method: "GET",
+    params: data,
+  });
 }
 // 通过主建id查单条数据
-function single(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/single',
-		method: 'GET',
-		params: data
-	})
+function single(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/single",
+    method: "GET",
+    params: data,
+  });
 }
 // 分页查询数据
-function pageList(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/page',
-		method: 'GET',
-		params: data
-	})
+function pageList(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/page",
+    method: "GET",
+    params: data,
+  });
 }
 // 新增数据
-function saveList(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/save',
-		method: 'POST',
-		data: data
-	})
+function saveList(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/save",
+    method: "POST",
+    data: data,
+  });
 }
 // 修改数据
-function updateList(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/update',
-		method: 'POST',
-		data: data
-	})
+function updateList(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/update",
+    method: "POST",
+    data: data,
+  });
 }
 // 删除数据
-function deleteList(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/delete',
-		method: 'POST',
-		params: data
-	})
+function deleteList(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/delete",
+    method: "POST",
+    params: data,
+  });
 }
 // 删除数据
-function delCategoryId(data : any, url : any) {
-	return request({
-		url: '/maindata/' + url + '/delete',
-		method: 'delete',
-		params: data
-	})
+function delCategoryId(data: any, url: any) {
+  return request({
+    url: "/maindata/" + url + "/delete",
+    method: "delete",
+    params: data,
+  });
 }
 // 物料同步财务系统
-function WMSPushProducts(data : any) {
-	return request({
-		url: '/omsOrder/WMSwork/WMSPushProducts',
-		method: 'POST',
-		params: data
-	})
+function WMSPushProducts(data: any) {
+  return request({
+    url: "/omsOrder/WMSwork/WMSPushProducts",
+    method: "POST",
+    params: data,
+  });
 }
 // 获取所有物料所在仓库库存
-function getMaterialInventory(data? : any) {
-	return request({
-		url: '/maindata/maindataStorehouse/getMaterialInventory',
-		method: 'GET',
-		params: data
-	})
+function getMaterialInventory(data?: any) {
+  return request({
+    url: "/maindata/maindataStorehouse/getMaterialInventory",
+    method: "GET",
+    params: data,
+  });
 }
 
 // 同步财务系统物料到OMS
-function syncMaterialByKingdeeToOms(data? : any) {
-	return request({
-		url: '/supply/financeApi/syncMaterialByKingdeeToOms',
-		method: 'GET',
-		params: data
-	})
+function syncMaterialByKingdeeToOms(data?: any) {
+  return request({
+    url: "/supply/financeApi/syncMaterialByKingdeeToOms",
+    method: "GET",
+    params: data,
+  });
 }
 
 // 根据时间段获取财务系统物料信息(获取金蝶物料列表)
-function getFinancialCode(data? : any) {
-	return request({
-		url: '/supply/financeApi/getFinancialCode',
-		method: 'GET',
-		params: data
-	})
+function getFinancialCode(data?: any) {
+  return request({
+    url: "/supply/financeApi/getFinancialCode",
+    method: "GET",
+    params: data,
+  });
 }
 //订单记录
-function queryByProductId(data? : any) {
-	return request({
-		url: '/omsOrder/omsOrder/queryByProductId',
-		method: 'POST',
-		params: data
-	})
+function queryByProductId(data?: any) {
+  return request({
+    url: "/omsOrder/omsOrder/queryByProductId",
+    method: "POST",
+    params: data,
+  });
 }
 //入库记录
-function inQueryBySku(data? : any) {
-	return request({
-		url: '/supply/supplyEntrySuborder/queryBySku',
-		method: 'GET',
-		params: data
-	})
-}
-function outQueryBySku(data? : any) {
-	return request({
-		url: '/supply/supplyOutSuborder/queryBySku',
-		method: 'GET',
-		params: data
-	})
+function inQueryBySku(data?: any) {
+  return request({
+    url: "/supply/supplyEntrySuborder/queryBySku",
+    method: "GET",
+    params: data,
+  });
+}
+function outQueryBySku(data?: any) {
+  return request({
+    url: "/supply/supplyOutSuborder/queryBySku",
+    method: "GET",
+    params: data,
+  });
 }
 
 //查wms库存
 function wmsStore(ids: any) {
-	return request({
-		url: '/omsOrder/WMSwork/WMSInventory',
-		method: 'POST',
-		params: ids
-	})
+  return request({
+    url: "/omsOrder/WMSwork/WMSInventory",
+    method: "POST",
+    params: ids,
+  });
+}
+
+//查询极智嘉商品库存
+function getJZJInventory(data: { wareHouseCode: string; items: string[] }) {
+  return request({
+    url: "/omsOrder/geekPlus/queryProductInventory",
+    method: "POST",
+    data,
+  });
 }
 
 export default {
-	treeList,
-	treeUseList,
-	childrenTreeList,
-	byCategoryPage,
-	single,
-	pageList,
-	saveList,
-	updateList,
-	deleteList,
-	delCategoryId,
-	WMSPushProducts,
-	getMaterialInventory,
-	syncMaterialByKingdeeToOms,
-	getFinancialCode,
-	queryByProductId,
-	inQueryBySku,
-	outQueryBySku,
-	wmsStore
-}
+  treeList,
+  treeUseList,
+  childrenTreeList,
+  byCategoryPage,
+  single,
+  pageList,
+  saveList,
+  updateList,
+  deleteList,
+  delCategoryId,
+  WMSPushProducts,
+  getMaterialInventory,
+  syncMaterialByKingdeeToOms,
+  getFinancialCode,
+  queryByProductId,
+  inQueryBySku,
+  outQueryBySku,
+  wmsStore,
+  getJZJInventory,
+};

+ 33 - 0
src/api/omsOrder.ts

@@ -9,6 +9,30 @@ export function query(params: any, data?: any) {
     data: data,
   });
 }
+//查询超时数据
+export function queryTimeOut(params: any, data?: any) {
+  return request({
+    url: "/omsOrder/omsOrder/queryByTimeout",
+    method: "POST",
+    params: params,
+    data: data,
+  });
+}
+
+//按条码查询数据
+export function queryByBarCode(params: {
+  businessType: string;
+  barCode: string;
+  pageNo: number;
+  pageSize: number;
+}) {
+  return request({
+    url: "/omsOrder/omsOrder/queryByBarCode",
+    method: "POST",
+    params: params,
+  });
+}
+
 //获取地址
 export function getProvince(data: any) {
   return request({
@@ -303,6 +327,15 @@ export function dswWaybill(params: any) {
   });
 }
 
+//智能审核
+export function autoAudit(data: any) {
+  return request({
+    url: "/omsOrder/customJob/updateJob",
+    method: "POST",
+    data: data,
+  });
+}
+
 export interface IResponeData<T> {
   msg: string;
   code: number;

+ 85 - 0
src/api/orderConfig.ts

@@ -0,0 +1,85 @@
+import request from "@/benyun/utils/request";
+//获得订单配置列表
+export function queryOrderTimeConfig(
+  params: IOrderTimeConfigRequest
+): Promise<IOrderTimeResponse<IOrderTimeConfigItem[]>> {
+  return request({
+    url: "/omsOrder/orderConfig/list",
+    params: params,
+    method: "GET",
+  });
+}
+
+//新增订单时间配置
+export function addOrderTimeConfig(data: {
+  timeout: number;
+}): Promise<IOrderTimeResponse<IOrderTimeConfigItem[]>> {
+  return request({
+    url: "/omsOrder/orderConfig",
+    data,
+    method: "POST",
+  });
+}
+
+//删除订单时间配置
+export function delOrderTimeConfig(
+  id: number
+): Promise<IOrderTimeResponse<string>> {
+  return request({
+    url: `/omsOrder/orderConfig/${id}`,
+    method: "DELETE",
+  });
+}
+
+export interface IOrderTimeConfigRequest {
+  createBy?: string;
+  createTime?: string;
+  updateBy?: string;
+  updateTime?: string;
+  params?: {
+    key: {
+      key?: string;
+    };
+  };
+  id?: number; // int64使用number类型
+  tenantId?: string;
+  deleteBy?: string;
+  deleteTime?: string;
+  isDeleted?: number; // 0或1使用number类型
+  extData?: string;
+  version?: number;
+  timeout?: string;
+  pageSize?: number;
+  pageNum?: number;
+  orderByColumn?: string;
+  isAsc?: string;
+}
+
+//订单时间配置数据项
+export interface IOrderTimeConfigItem {
+  createBy?: string;
+  createTime?: string;
+  updateBy?: string;
+  updateTime?: string;
+  params?: {
+    [key: string]: any; // 处理空对象的情况
+  };
+  id?: number;
+  tenantId?: string;
+  deleteBy?: string;
+  deleteTime?: string;
+  isDeleted?: number;
+  extData?: string;
+  version?: number;
+  timeout?: number; // 根据示例值0.0推断为number类型
+}
+
+//订单时间配置响应数据
+export interface IOrderTimeResponse<T> {
+  total: number;
+  rows: T[];
+  code: number;
+  msg: string;
+}
+
+// ... existing code ...

+ 73 - 56
src/api/shop.ts

@@ -1,82 +1,99 @@
-import request from '@/benyun/utils/request'
+import request from "@/benyun/utils/request";
 
 //查询数据
-export function query(params:any) {
-	return request({
-		url: '/omsOrder/shop/page',
-		method: 'get',
-		params:params
-	})
+export function query(params: any) {
+  return request({
+    url: "/omsOrder/shop/page",
+    method: "get",
+    params: params,
+  });
 }
 
 //新增数据
-export function save(data:any) {
-	return request({
-		url: '/omsOrder/shop/save',
-		method: 'POST',
-		data:data
-	})
+export function save(data: any) {
+  return request({
+    url: "/omsOrder/shop/save",
+    method: "POST",
+    data: data,
+  });
 }
 
 //修改数据
-export function update(data:any) {
-	return request({
-		url: '/omsOrder/shop/update',
-		method: 'POST',
-		data:data
-	})
+export function update(data: any) {
+  return request({
+    url: "/omsOrder/shop/update",
+    method: "POST",
+    data: data,
+  });
 }
 
 //点三店铺列表查询
-export function dian3ShopQuery(data:any) {
-	return request({
-		url: '/omsOrder/shop/query',
-		method: 'POST',
-		data:data
-	})
+export function dian3ShopQuery(data: any) {
+  return request({
+    url: "/omsOrder/shop/query",
+    method: "POST",
+    data: data,
+  });
 }
 
 //删除数据
-export function del(data:any) {
-	return request({
-		url: '/omsOrder/omsShop/delete',
-		method: 'POST',
-		params:data
-	})
+export function del(data: any) {
+  return request({
+    url: "/omsOrder/omsShop/delete",
+    method: "POST",
+    params: data,
+  });
 }
 
 //店铺授权
-export function shopAuth(data:any) {
-	return request({
-		url: '/omsOrder/shop/auth',
-		method: 'GET',
-		params:data
-	})
+export function shopAuth(data: any) {
+  return request({
+    url: "/omsOrder/shop/auth",
+    method: "GET",
+    params: data,
+  });
 }
 
 //授权签名
-export function shopSign(data:any) {
-	return request({
-		url: '/omsOrder/shop/buildSign',
-		method: 'POST',
-		params:data
-	})
+export function shopSign(data: any) {
+  return request({
+    url: "/omsOrder/shop/buildSign",
+    method: "POST",
+    params: data,
+  });
 }
 
 //修改授权状态
-export function shopState(data:any) {
-	return request({
-		url: '/omsOrder/shop/edit',
-		method: 'POST',
-		data:data
-	})
+export function shopState(data: any) {
+  return request({
+    url: "/omsOrder/shop/edit",
+    method: "POST",
+    data: data,
+  });
 }
 
 //通过点3授权成功回调店铺id新增店铺
-export function shopAdd(data:any) {
-	return request({
-		url: '/omsOrder/shop/add',
-		method: 'POST',
-		params:data
-	})
-}
+export function shopAdd(data: any) {
+  return request({
+    url: "/omsOrder/shop/add",
+    method: "POST",
+    params: data,
+  });
+}
+
+export interface IShopResponse<T> {
+  code: number;
+  data: {
+    countId: number;
+    current: number;
+    maxLimit: number;
+    optimizeCountSql: boolean;
+    orders: Array<any>;
+    pages: number;
+    records: T[];
+    searchCount: boolean;
+    size: number;
+    total: number;
+  };
+  msg: string;
+}

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

@@ -6,7 +6,7 @@ const ExpiresInKey = "AdminOMS-Expires-In";
 
 export function getToken() {
   if (process.env.NODE_ENV === "development") {
-    return "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6Ijk1YTgxNzM1LWRiMzYtNGU4Yi1hODQxLWQ3YjdhMjE2OWJiNiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.iiw0Gavt1HTMceI1SokEEz0NBl9O-OCP3_LaNlzUq8b71TirmRT30TzkmvfxcFGIFHmQzmapNwopupwvoFvBhw";
+    return "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjkwNDA5YmQ5LThjN2UtNGIxMC04NTI1LTQzMWYxOGI5MTQyMiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.9_oWqO4d79ffCaD99YHKLBViGA-x64DxyQAzKR3TAvaqO_ioD8mf4tw9aSMhaS9l3wyETxhOYs1WLQvF2c8BNg";
   } else {
     return Cookies.get(TokenKey);
   }

+ 116 - 0
src/views/audit/store/components/liveView.vue

@@ -0,0 +1,116 @@
+<template>
+    <el-drawer v-loading="load" title="查看生命周期" :visible.sync="drawer" @close="close" :direction="direction" size="50%">
+        <div class="content">
+
+
+        </div>
+    </el-drawer>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+
+
+@Component({ components: {} })
+export default class LiveView extends Vue {
+    drawer = false;
+    direction = 'rtl'
+    data: any = {};
+    isSuccess = false;
+    load = false;
+    setShow(v: boolean) {
+        this.drawer = v;
+    }
+    setItem(data: any) {
+        this.data = data
+        console.info('data', data, this.data)
+    }
+    close() {
+        if (this.isSuccess) {
+            this.$emit('handleSuccess');
+        }
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+.content {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 16px;
+    background-color: #FFF;
+
+    .order-top {
+        padding-bottom: 16px;
+        display: flex;
+        justify-content: center;
+    }
+}
+
+.deli-footer {
+    height: 80px;
+    width: 100%;
+    box-shadow: 0 -5px 10px #EEE;
+    padding: 0 16px 8px;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-end;
+    position: absolute;
+    background-color: #FFF;
+    left: 0;
+    bottom: 0;
+    z-index: 10;
+
+    .d-left {
+        width: 50%;
+
+        .estimate-total {
+            font-size: 14px;
+            padding-bottom: 4px;
+
+            .total {
+                font-size: 16px;
+                color: #F00;
+            }
+
+            .detail {
+                color: #1684FC;
+                padding-left: 16px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .send-btn {
+        width: 120px;
+        height: 40px;
+        line-height: 40px;
+        margin-left: 16px;
+        border-radius: 8px;
+        background: linear-gradient(129.2deg, rgba(22, 132, 252, 1) 9.81%, rgba(93, 167, 249, 1) 97.4%);
+        color: rgba(255, 255, 255, 100);
+        font-size: 14px;
+        text-align: center;
+        box-shadow: 0px 2px 6px 0px rgba(93, 167, 249, 100);
+        cursor: pointer;
+    }
+
+    .stopBtn {
+        opacity: 0.7;
+    }
+
+    .btn-box {
+        width: 50%;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+    }
+}
+
+.space {
+    height: 80px;
+    width: 100%;
+    margin-top: 16px;
+}
+</style>

+ 402 - 326
src/views/audit/store/index.vue

@@ -1,381 +1,457 @@
 <template>
 	<div class="my-container">
 		<div class="bill-main">
-			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList" @resert="onRefresh"
-				@detail="shortBarge" @onRefresh="onRefresh">
+			<module-view :propConfig="config" ref="moduleView" @pagination="getDataList" @search="getDataList"
+				@resert="onRefresh" @detail="shortBarge" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 		<batchbyOneModal ref="batchbyOneModal" />
+		<liveView ref="liveView" />
 	</div>
 </template>
 <script lang="ts">
-	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-	import api from "@/api/currency";
-	import batchbyOneModal from './components/batchbyOneModal.vue'
-	import storeTag from './components/storeTag.vue'
-	@Component({components:{batchbyOneModal}})
-	export default class Store extends Vue {
-		timeNum = 0;
-		calculateCount = 0;
-		skuInfo : any = ''
-		storeHouseInfo : any = ''
-		tableInfo : any = ''
-		timer : any = null
-		config : any = {
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import api from "@/api/currency";
+import batchbyOneModal from './components/batchbyOneModal.vue'
+import storeTag from './components/storeTag.vue'
+import liveView from './components/liveView.vue'
+@Component({ components: { batchbyOneModal, liveView } })
+export default class Store extends Vue {
+	timeNum = 0;
+	calculateCount = 0;
+	skuInfo: any = ''
+	storeHouseInfo: any = ''
+	tableInfo: any = ''
+	timer: any = null
+	//缓存tableConfig
+	tableConfig: any = {}
+
+	config: any = {
+		attr: {
+			calculateH: true
+		},
+		search: {
 			attr: {
-				calculateH: true
+				size: 'mini',
 			},
-			search: {
-				attr: {
-					size: 'mini',
-				},
-				columns: [
-					[
-						// {
-						// 	span: 6,
-						// 	label: '标题',
-						// 	prop: 'name',
-						// 	component: 'by-input',
-						// 	// labelWidth: '70px',
-						// 	compConfig: {
-						// 		attr: {
-						// 			placeholder: '请输入标题',
-						// 			clearable: true
-						// 		}
-						// 	}
-						// },
-						{
-							span: 6,
-							label: '物料编码',
-							prop: 'skuCode',
-							component: 'by-input',
-							// labelWidth: '70px',
-							compConfig: {
-								attr: {
-									placeholder: '请输入物料编码',
-									clearable: true
-								}
-							}
-						},
-						{
-							span: 6,
-							label: '69码-商品条码',
-							prop: 'barCode',
-							labelWidth: '130px',
-							component: 'by-input',
-							compConfig: {
-								attr: {
-									placeholder: '69码-商品条码',
-									clearable: true
-								}
-							}
-						},
-						{
-							span: 6,
-							label: '财务编号',
-							prop: 'accountingCode',
-							component: 'by-input',
-							compConfig: {
-								attr: {
-									placeholder: '请输入财务编号',
-									clearable: true
-								}
+			columns: [
+				[
+					// {
+					// 	span: 6,
+					// 	label: '标题',
+					// 	prop: 'name',
+					// 	component: 'by-input',
+					// 	// labelWidth: '70px',
+					// 	compConfig: {
+					// 		attr: {
+					// 			placeholder: '请输入标题',
+					// 			clearable: true
+					// 		}
+					// 	}
+					// },
+					{
+						span: 6,
+						label: '物料编码',
+						prop: 'skuCode',
+						component: 'by-input',
+						// labelWidth: '70px',
+						compConfig: {
+							attr: {
+								placeholder: '请输入物料编码',
+								clearable: true
 							}
 						}
-					]
-				]
-			},
-			tool: {
-				tools: {
-					refresh: true,
-					search: true,
-				},
-				customTools:[{
-					name:'短驳调拨',
-					icon:'el-icon-discount',
-					event:{
-						click: () => {
-							this.shortBargeHandel()
-						}
-					}
-				}]
-			},
-			table: {
-				attr: {
-					size: 'mini',
-					align: 'left',
-					height: '620',
-					checkbox: true,
-				},
-				columns: [
-					{
-						// width: '200px',
-						title: '标题',
-						field: 'skuTitle',
-						// isDetail: true,
-						fixed: 'left'
 					},
 					{
-						// width: '200px',
-						title: '副标题',
-						field: 'skuSubtitle',
-					},
-					{
-						// width: '140px',
-						title: '物料编码',
-						field: 'skuCode',
-					},
-					{
-						// width: '140px',
-						title: '69码-商品条码',
-						field: 'barCode',
+						span: 6,
+						label: '69码-商品条码',
+						prop: 'barCode',
+						labelWidth: '130px',
+						component: 'by-input',
+						compConfig: {
+							attr: {
+								placeholder: '69码-商品条码',
+								clearable: true
+							}
+						}
 					},
 					{
-						// width: '140px',
-						title: '财务编号',
-						field: 'financialCode',
+						span: 6,
+						label: '财务编号',
+						prop: 'accountingCode',
+						component: 'by-input',
+						compConfig: {
+							attr: {
+								placeholder: '请输入财务编号',
+								clearable: true
+							}
+						}
 					}
-
 				]
+			]
+		},
+		tool: {
+			tools: {
+				refresh: true,
+				search: true,
+			},
+			customTools: [{
+				name: '短驳调拨',
+				icon: 'el-icon-discount',
+				event: {
+					click: () => {
+						this.shortBargeHandel()
+					}
+				}
+			}]
+		},
+		table: {
+			attr: {
+				size: 'mini',
+				align: 'left',
+				height: '620',
+				checkbox: true,
 			},
+			columns: [
+				{
+					// width: '200px',
+					title: '标题',
+					field: 'skuTitle',
+					// isDetail: true,
+					fixed: 'left'
+				},
+				{
+					// width: '200px',
+					title: '副标题',
+					field: 'skuSubtitle',
+				},
+				{
+					// width: '140px',
+					title: '物料编码',
+					field: 'skuCode',
+				},
+				{
+					// width: '140px',
+					title: '69码-商品条码',
+					field: 'barCode',
+				},
+				{
+					// width: '140px',
+					title: '财务编号',
+					field: 'financialCode',
+				},
+				{
+					title: '刷新极智嘉库存', action: true, plugins: [{
+						icon: 'el-icon-refresh',
+						name: '刷新',
+						audit: '',
+						event: {
+							click: (item: any) => {
+								(this as any).refreshStore(item)
+							}
+						}
+					}]
+				}, {
+					title: '生命周期', action: true, plugins: [{
+						icon: 'el-icon-view',
+						name: '查看',
+						audit: '',
+						event: {
+							click: (item: any) => {
+								(this as any).openDrawer(item)
+							}
+						}
+					}]
+				}
+			]
+		},
+	}
+	mounted() {
+		this.timer = setInterval(() => {
+			this.getDataList()
+			this.initTable();
+		}, 300)
+	}
+	// 计算高度
+	initTable() {
+		if (!this.$refs.moduleView) {
+			this.calculateCount++;
+			if (this.calculateCount > 5) return;
+			setTimeout(() => {
+				this.initTable()
+			}, 500)
+			return
 		}
-		mounted() {
-			this.timer = setInterval(() => {
-				this.getDataList()
-				this.initTable();
-			}, 300)
+		let tableId: any = (this as any).$refs.moduleView.tableID;
+		this.config.table.attr.height = window.innerHeight - 320;
+		(this as any).$refs.moduleView.$refs[tableId].recalculate();
+	}
+	//短驳处理
+	shortBargeHandel() {
+		let data = (this.$refs.moduleView as any).getSelectData();
+		if (!data || data.length == 0) {
+			this.$message('请选择数据');
+			return
 		}
-		// 计算高度
-		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 - 320;
-			(this as any).$refs.moduleView.$refs[tableId].recalculate();
+		if (this.$refs.batchbyOneModal) {
+			(this.$refs.batchbyOneModal as any).setShow(true);
+			(this.$refs.batchbyOneModal as any).setValue(data)
 		}
-		//短驳处理
-		shortBargeHandel(){
-			let data = (this.$refs.moduleView as any).getSelectData();
-			if(!data || data.length == 0) {
-				this.$message('请选择数据');
-				return
-			}
-			if(this.$refs.batchbyOneModal){
-				(this.$refs.batchbyOneModal as any).setShow(true);
-				(this.$refs.batchbyOneModal as any).setValue(data)
-			}
+	}
+	//打开抽屉
+	openDrawer(item: any) {
+		if (this.$refs.liveView) {
+			(this.$refs.liveView as any).setItem(item);
+			(this.$refs.liveView as any).setShow(true);
+		}
+	}
+	addCol() {
+		let storeCol = [
+			{ title: '极智嘉良品数量', field: 'lpAmount' },
+			{ title: '极智嘉次品数量', field: 'cpAmount' },
+			{ title: '极智嘉可销售库存', field: 'remainAmount' },
+			{ title: '极智嘉锁定数', field: 'lockAmount' },
+
+		]
+		//如果this.tableConfig.columns中不存在storeCol,则添加
+		if (!this.tableConfig.columns.find((v: any) => (v.field == 'lpAmount' || v.field == 'cpAmount' || v.field == 'remainAmount' || v.field == 'lockAmount'))) {
+			this.tableConfig.columns = [...this.tableConfig.columns, ...storeCol]
+		}
+	}
+	//刷新极智嘉库存
+	async refreshStore(item: any) {
+		//获取this.tableInfo的skuCode字段的值,放入items数组
+		let items = [item.skuCode]
+		let loading = this.$loading({ target: '.main-container' });
+		//调用api.getJZJInventory
+		const res = await api.getJZJInventory({ wareHouseCode: '', items: items })
+		if (res.data.code != 200) {
+			loading.close();
+			this.$message.error(res.data.message)
+			return
 		}
-		// 获取列表数据
-		getDataList() {
-			if (!this.$refs.moduleView) {
-				if (this.timeNum > 5) {
-					clearInterval(this.timer)
+		const resItems = res.data.items
+		//遍历this.tableInfo,添加resItems中的数据
+		for (let i = 0; i < this.tableInfo.length; i++) {
+			for (let j = 0; j < resItems.length; j++) {
+				if (this.tableInfo[i].skuCode == resItems[j].barCode) {
+					this.tableInfo[i].lpAmount = resItems[j].lpAmount
+					this.tableInfo[i].cpAmount = resItems[j].cpAmount
+					this.tableInfo[i].remainAmount = resItems[j].remainAmount
+					this.tableInfo[i].lockAmount = resItems[j].lockAmount
 				}
-				this.timeNum++;
-				return
 			}
-			clearInterval(this.timer)
-			// this.getPageList(); //旧代码无分页
-			
-			// 新分页
-			let query = (this.$refs.moduleView as any).getQuery();
-			this.newsGetPageList(query)
 		}
+		loading.close();
+		(this.$refs.moduleView as any).setTableValue(this.tableInfo);
+	}
+	// 获取列表数据
+	getDataList() {
+		if (!this.$refs.moduleView) {
+			if (this.timeNum > 5) {
+				clearInterval(this.timer)
+			}
+			this.timeNum++;
+			return
+		}
+		clearInterval(this.timer)
+		// this.getPageList(); //旧代码无分页
+
 		// 新分页
-		newsGetPageList(query : any) {
-			let loading = this.$loading({ target: '.main-container' });
-			api.getMaterialInventory().then((res : any) => {
+		let query = (this.$refs.moduleView as any).getQuery();
+		this.newsGetPageList(query)
+	}
+	// 新分页
+	newsGetPageList(query: any) {
+		let loading = this.$loading({ target: '.main-container' });
+		api.getMaterialInventory().then((res: any) => {
+			if (res.code === 200) {
+				this.skuInfo = res.data;
+			} else loading.close();
+		}).then(() => {
+			api.pageList({}, 'maindataStorehouse').then((res: any) => {
 				if (res.code === 200) {
-					this.skuInfo = res.data;
+					this.storeHouseInfo = res.data.records;
 				} else loading.close();
+				if (res.code === 200) {
+					let moduleConfig = (this as any).$lodash.cloneDeep(this.config.table);
+					this.storeHouseInfo = res.data.records;
+					res.data.records.map((v: any, i: any) => {
+						moduleConfig.columns.push({
+							// width: '150px',
+							title: v.name,
+							field: 'custom' + i,
+							component: storeTag
+						});
+					});
+					(this as any).$refs.moduleView.setTableConfig(moduleConfig);
+					this.tableConfig = moduleConfig
+					this.addCol();//添加查询极智嘉商品库存相关数据列
+				}
 			}).then(() => {
-				api.pageList({}, 'maindataStorehouse').then((res : any) => {
+				api.pageList(query, 'maindataMaterialSku').then((res: any) => {
+					loading.close();
 					if (res.code === 200) {
-						this.storeHouseInfo = res.data.records;
-					} else loading.close();
-					if (res.code === 200) {
-						let moduleConfig = (this as any).$lodash.cloneDeep(this.config.table);
-						this.storeHouseInfo = res.data.records;
-						res.data.records.map((v : any, i : any) => {
-							moduleConfig.columns.push({
-								// width: '150px',
-								title: v.name,
-								field: 'custom' + i,
-								component:storeTag
-							});
-						});
-						(this as any).$refs.moduleView.setTableConfig(moduleConfig);
-					}
-				}).then(() => {
-					api.pageList(query, 'maindataMaterialSku').then((res : any) => {
-						loading.close();
-						if (res.code === 200) {
-							for (let i = 0; i < res.data.records.length; i++) {
-								for (let j = 0; j < this.storeHouseInfo.length; j++) {
-									let nowData = this.skuInfo.filter((v : any) => v.skuId == res.data.records[i].id && v.storeHouseId == this.storeHouseInfo[j].id);
-									if (nowData[0]) res.data.records[i]['custom' + j] = nowData[0].inventory;
-								}
+						for (let i = 0; i < res.data.records.length; i++) {
+							for (let j = 0; j < this.storeHouseInfo.length; j++) {
+								let nowData = this.skuInfo.filter((v: any) => v.skuId == res.data.records[i].id && v.storeHouseId == this.storeHouseInfo[j].id);
+								if (nowData[0]) res.data.records[i]['custom' + j] = nowData[0].inventory;
 							}
-							(this.$refs.moduleView as any).setTableValue(res.data.records);
-							this.tableInfo = res.data.records;
-							loading.close();
-							let page = {
-								pageNo: res.data.current, //当前页
-								pageSize: res.data.size, //每页条数
-								total: res.data.total //总条数
-							};
-							(this.$refs.moduleView as any).setPage(page);
-						} else this.$message.error(res.msg);
-					}).catch(() => loading.close());
+						}
+						(this.$refs.moduleView as any).setTableValue(res.data.records);
+						this.tableInfo = res.data.records;
+						loading.close();
+						let page = {
+							pageNo: res.data.current, //当前页
+							pageSize: res.data.size, //每页条数
+							total: res.data.total //总条数
+						};
+						(this.$refs.moduleView as any).setPage(page);
+					} else this.$message.error(res.msg);
 				}).catch(() => loading.close());
 			}).catch(() => loading.close());
-		}
-		
-		//旧代码无分页
-		getPageList() {
-			let loading = this.$loading({ target: '.main-container' });
-			api.getMaterialInventory().then((res : any) => {
+		}).catch(() => loading.close());
+	}
+
+	//旧代码无分页
+	getPageList() {
+		let loading = this.$loading({ target: '.main-container' });
+		api.getMaterialInventory().then((res: any) => {
+			if (res.code === 200) {
+				this.skuInfo = res.data;
+			} else loading.close();
+		}).then(() => {
+			api.pageList({}, 'maindataStorehouse').then((res: any) => {
 				if (res.code === 200) {
-					this.skuInfo = res.data;
+					this.storeHouseInfo = res.data.records;
 				} else loading.close();
+				if (res.code === 200) {
+					let moduleConfig = (this as any).$lodash.cloneDeep(this.config.table);
+					this.storeHouseInfo = res.data.records;
+					res.data.records.map((v: any, i: any) => {
+						moduleConfig.columns.push({
+							width: '120px',
+							title: v.name,
+							field: 'custom' + i,
+						});
+					});
+					// moduleConfig.columns.push({
+					// 	width: 120,
+					// 	title: '操作',
+					// 	action: true,
+					// 	plugins: [{
+					// 		name: '短驳',
+					// 		event: {
+					// 			click: (item : any) => {
+					// 				(this as any).shortBarge(item)
+					// 			}
+					// 		}
+					// 	}, {
+					// 		name: '调拨',
+					// 		event: {
+					// 			click: (item : any) => (this as any).allocate(item)
+					// 		}
+					// 	}]
+					// });
+					(this as any).$refs.moduleView.setTableConfig(moduleConfig);
+				}
 			}).then(() => {
-				api.pageList({}, 'maindataStorehouse').then((res : any) => {
+				api.pageList({
+					pageNo: 1,
+					pageSize: 20,
+				}, 'maindataMaterialSku').then((res: any) => {
 					if (res.code === 200) {
-						this.storeHouseInfo = res.data.records;
-					} else loading.close();
-					if (res.code === 200) {
-						let moduleConfig = (this as any).$lodash.cloneDeep(this.config.table);
-						this.storeHouseInfo = res.data.records;
-						res.data.records.map((v : any, i : any) => {
-							moduleConfig.columns.push({
-								width: '120px',
-								title: v.name,
-								field: 'custom' + i,
-							});
-						});
-						// moduleConfig.columns.push({
-						// 	width: 120,
-						// 	title: '操作',
-						// 	action: true,
-						// 	plugins: [{
-						// 		name: '短驳',
-						// 		event: {
-						// 			click: (item : any) => {
-						// 				(this as any).shortBarge(item)
-						// 			}
-						// 		}
-						// 	}, {
-						// 		name: '调拨',
-						// 		event: {
-						// 			click: (item : any) => (this as any).allocate(item)
-						// 		}
-						// 	}]
-						// });
-						(this as any).$refs.moduleView.setTableConfig(moduleConfig);
-					}
-				}).then(() => {
-					api.pageList({
-						pageNo: 1,
-						pageSize: 20,
-					}, 'maindataMaterialSku').then((res : any) => {
-						if (res.code === 200) {
-							for (let i = 0; i < res.data.records.length; i++) {
-								for (let j = 0; j < this.storeHouseInfo.length; j++) {
-									let nowData = this.skuInfo.filter((v : any) => v.skuId == res.data.records[i].id && v.storeHouseId == this.storeHouseInfo[j].id);
-									if (nowData[0]) res.data.records[i]['custom' + j] = nowData[0].inventory;
-								}
+						for (let i = 0; i < res.data.records.length; i++) {
+							for (let j = 0; j < this.storeHouseInfo.length; j++) {
+								let nowData = this.skuInfo.filter((v: any) => v.skuId == res.data.records[i].id && v.storeHouseId == this.storeHouseInfo[j].id);
+								if (nowData[0]) res.data.records[i]['custom' + j] = nowData[0].inventory;
 							}
-							(this.$refs.moduleView as any).setTableValue(res.data.records);
-							this.tableInfo = res.data.records;
-							loading.close();
-							// let page = {
-							// 	pageNo: res.data.current, //当前页
-							// 	pageSize: res.data.size, //每页条数
-							// 	total: res.data.total //总条数
-							// }; 	
-							// (this.$refs.moduleView as any).setPage(page);
-						} else loading.close();
-					}).catch(() => loading.close());
+						}
+						(this.$refs.moduleView as any).setTableValue(res.data.records);
+						this.tableInfo = res.data.records;
+						loading.close();
+						// let page = {
+						// 	pageNo: res.data.current, //当前页
+						// 	pageSize: res.data.size, //每页条数
+						// 	total: res.data.total //总条数
+						// }; 	
+						// (this.$refs.moduleView as any).setPage(page);
+					} else loading.close();
 				}).catch(() => loading.close());
 			}).catch(() => loading.close());
-		}
-		// 查询
-		search() {
-			let searchID : any = (this as any).$refs.moduleView.searchID;
-			let value = (this as any).$refs.moduleView.$refs[searchID].value;
-			if (value.name) {
-				if (value.skuCode) {
-					// let newData = this.tableInfo.filter((v : any) => v.skuCode == value.skuCode && v.name == value.name);
-					let newData = this.tableInfo.filter((v : any) => v.skuCode.indexOf(value.skuCode)>-1 && v.name.indexOf(value.name)>-1);
-					(this.$refs.moduleView as any).setTableValue(newData);
-				} else {
-					// let newData = this.tableInfo.filter((v : any) => v.name == value.name);
-					let newData = this.tableInfo.filter((v : any) => v.name.indexOf(value.name)>-1);
-					(this.$refs.moduleView as any).setTableValue(newData);
-				}
+		}).catch(() => loading.close());
+	}
+	// 查询
+	search() {
+		let searchID: any = (this as any).$refs.moduleView.searchID;
+		let value = (this as any).$refs.moduleView.$refs[searchID].value;
+		if (value.name) {
+			if (value.skuCode) {
+				// let newData = this.tableInfo.filter((v : any) => v.skuCode == value.skuCode && v.name == value.name);
+				let newData = this.tableInfo.filter((v: any) => v.skuCode.indexOf(value.skuCode) > -1 && v.name.indexOf(value.name) > -1);
+				(this.$refs.moduleView as any).setTableValue(newData);
 			} else {
-				if (value.skuCode) {
-					// let newData = this.tableInfo.filter((v : any) => v.skuCode == value.skuCode);
-					let newData = this.tableInfo.filter((v : any) => v.skuCode.indexOf(value.skuCode)>-1);
-					(this.$refs.moduleView as any).setTableValue(newData);
-				} else this.getDataList();
+				// let newData = this.tableInfo.filter((v : any) => v.name == value.name);
+				let newData = this.tableInfo.filter((v: any) => v.name.indexOf(value.name) > -1);
+				(this.$refs.moduleView as any).setTableValue(newData);
 			}
-
-		}
-		// 短驳
-		shortBarge(e : any) {
-			// console.log(e);
-		}
-		// 调拨
-		allocate(item : any) {
-			// console.log(item);
-		}
-		// 刷新/重置
-		onRefresh() {
-			(this as any).$refs.moduleView.clearSearch();
-			this.getDataList();
+		} else {
+			if (value.skuCode) {
+				// let newData = this.tableInfo.filter((v : any) => v.skuCode == value.skuCode);
+				let newData = this.tableInfo.filter((v: any) => v.skuCode.indexOf(value.skuCode) > -1);
+				(this.$refs.moduleView as any).setTableValue(newData);
+			} else this.getDataList();
 		}
+
+	}
+	// 短驳
+	shortBarge(e: any) {
+		// console.log(e);
 	}
+	// 调拨
+	allocate(item: any) {
+		// console.log(item);
+	}
+	// 刷新/重置
+	onRefresh() {
+		(this as any).$refs.moduleView.clearSearch();
+		this.getDataList();
+	}
+}
 </script>
 <style lang="scss" scoped>
-	.my-container {
-		width: 100%;
-		box-sizing: border-box;
-		display: flex;
-		padding: 16px;
-		height: 100%;
-
-		.bill-left {
-			position: relative;
-			border-right: solid #EEE 1px;
-			flex-shrink: 0;
+.my-container {
+	width: 100%;
+	box-sizing: border-box;
+	display: flex;
+	padding: 16px;
+	height: 100%;
 
-			.bill-tab {
-				width: 150px;
-				height: 100%;
-				transition: all .5s;
-				overflow: hidden;
-			}
+	.bill-left {
+		position: relative;
+		border-right: solid #EEE 1px;
+		flex-shrink: 0;
 
-			.tab-title {
-				font-size: 16px;
-				padding-bottom: 16px;
-				width: 200px;
-			}
+		.bill-tab {
+			width: 150px;
+			height: 100%;
+			transition: all .5s;
+			overflow: hidden;
 		}
 
-		.bill-main {
-			width: 100%;
-			box-sizing: border-box;
-			position: relative;
-			height: 100%;
-			overflow-y: hidden;
+		.tab-title {
+			font-size: 16px;
+			padding-bottom: 16px;
+			width: 200px;
 		}
 	}
+
+	.bill-main {
+		width: 100%;
+		box-sizing: border-box;
+		position: relative;
+		height: 100%;
+		overflow-y: hidden;
+	}
+}
 </style>

+ 94 - 0
src/views/oms/B2BOrder/components/autoAudit.vue

@@ -0,0 +1,94 @@
+<template>
+    <vxe-modal v-model="value" id="addQuest" width="400" v-loading="load" @show="show" @hide="hide" height="200"
+        show-footer title="智能审核设置">
+        <by-form :propConfig="config" ref="form"></by-form>
+        <template #footer>
+            <div class="btn">
+                <el-button plain size="small" @click="value = false">取消</el-button>
+                <el-button type="primary" size="small" @click="btn">确定</el-button>
+            </div>
+        </template>
+    </vxe-modal>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { save } from '@/api/question'
+@Component({ components: {} })
+export default class AutoAudit extends Vue {
+    value = false;
+    load = false;
+    config = {
+        attr: { size: 'mini' },
+        columns: [
+            [{
+                span: 16,
+                label: '当前状态',
+                prop: 'jobState',
+                component: 'by-switch',
+                compConfig: {
+                    attr: {
+                        activeText: '开启',
+                        inactiveText: '关闭'
+                    }
+                }
+            }, {
+                span: 16,
+                label: '时间',
+                prop: 'scheduleConf',
+                component: 'by-select',
+                compConfig: {
+                    attr: {
+                        clearable: false,
+                        defaultIndex: 0,
+                        data: [{
+                            label: '10分钟',
+                            value: '*/10 * * * *'
+                        }, {
+                            label: '30分钟',
+                            value: '*/30 * * * *'
+                        }, {
+                            label: '1小时',
+                            value: '0 * * * *'
+                        }]
+                    }
+                }
+            }]
+        ]
+    }
+    show() {
+
+    }
+    hide() {
+        (this.$refs.form as any).clearValidate();
+        (this.$refs.form as any).clearValue();
+    }
+    setShow(v: boolean) {
+        this.value = v;
+    }
+    btn() {
+        let v = (this.$refs.form as any).getValue();
+        if (v.jobState === undefined) {
+            v.jobState = 2
+        } else {
+            v.jobState = 1
+        }
+        this.$emit('handleAutoAudit', v);
+        this.value = false;
+
+        // (this.$refs.form as any).validate().then(() => {
+        //     let data = (this.$refs.form as any).getValue();
+        //     this.load = true
+        //     save(data).then(() => {
+        //         this.load = false;
+        //         this.$emit('handleSuccess');
+        //         this.value = false;
+        //     }).catch(() => {
+        //         this.load = false;
+        //     })
+        // })
+    }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 93 - 89
src/views/oms/B2BOrder/components/orderTable.vue

@@ -1,13 +1,6 @@
 <template>
-  <vxe-table
-    size="mini"
-    border
-    stripe
-    ref="table"
-    :height="height"
-    :row-config="{isCurrent: true,isHover: true}"
-    :checkbox-config="{checkMethod: checCheckboxkMethod}"
-    :data="data">
+  <vxe-table size="mini" border stripe ref="table" :height="height" :row-config="{ isCurrent: true, isHover: true }"
+    :checkbox-config="{ checkMethod: checCheckboxkMethod }" :data="data">
     <vxe-column type="checkbox" width="50" fixed="left"></vxe-column>
     <!-- <vxe-column type="seq" width="60" title="序号" fixed="left"></vxe-column> -->
     <vxe-column field="id" title="内部订单号" width="100" fixed="left">
@@ -29,8 +22,9 @@
     </vxe-column>
     <vxe-column field="product" title="商品" width="140">
       <template #default="{ row }">
-        <el-badge :value="item.qty" class="item-pro" type="primary" :max="99" v-for="(item,index) of row.items" :key="index">
-          <el-image  style="width: 28px; height: 28px">
+        <el-badge :value="item.qty" class="item-pro" type="primary" :max="99" v-for="(item, index) of row.items"
+          :key="index">
+          <el-image style="width: 28px; height: 28px">
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>
             </div>
@@ -68,6 +62,7 @@
         {{ getFromText(row.operationFlag) }}
       </template>
     </vxe-column>
+    <vxe-column field="orderTimeout" title="待处理时长" width="110"></vxe-column>
     <vxe-column field="shopName" title="店铺名称" width="140"></vxe-column>
     <vxe-column field="orderDate" title="订单日期" width="140">
       <!-- <template #default="{ row }">
@@ -89,7 +84,7 @@
     <vxe-column field="weight" title="重量" width="70"></vxe-column>
     <vxe-column field="isCod" title="是否货到付款" width="120">
       <template #default="{ row }">
-        {{ row.isCod == 1 ? '是' :' 否' }}
+        {{ row.isCod == 1 ? '是' : ' 否' }}
       </template>
     </vxe-column>
     <vxe-column field="sendDate" title="发货日期" width="140"></vxe-column>
@@ -104,8 +99,8 @@
     <vxe-column field="freeAmount" title="抵扣金额" align="right" width="120"></vxe-column>
     <vxe-column field="payAmount" title="应付+运费" align="right" width="120">
       <template #default="{ row }">
-        <span>{{ row.payAmount }}</span> <br/>
-        <span style="color: #b9b8b8;">{{ row.freight?row.freight:0 }}</span>
+        <span>{{ row.payAmount }}</span> <br />
+        <span style="color: #b9b8b8;">{{ row.freight ? row.freight : 0 }}</span>
       </template>
     </vxe-column>
     <vxe-column field="paidAmount" title="实付金额" align="right" width="120"></vxe-column>
@@ -118,8 +113,8 @@
     <!-- <vxe-column field="invoiceType" title="发票类型" width="120"></vxe-column> -->
     <vxe-column field="invoiceTitle" title="发票抬头+税号" width="120">
       <template #default="{ row }">
-        <span>{{ row.invoiceTitle }}</span> <br/>
-        <span style="color: #b9b8b8;">{{ row.buyerTaxNo }}</span><br/>
+        <span>{{ row.invoiceTitle }}</span> <br />
+        <span style="color: #b9b8b8;">{{ row.buyerTaxNo }}</span><br />
         <span>{{ row.invoiceType }}</span>
       </template>
     </vxe-column>
@@ -134,7 +129,9 @@
         <el-button type="text" size="mini" v-if="showMerge(row)" @click="mergeHandle(row)">合并</el-button>
         <el-button type="text" size="mini" v-if="showSplit(row)" @click="splitHandle(row)">拆分</el-button>
         <!-- <el-button type="text" size="mini" v-if="showSend(row)" @click="sendGoods(row)">发货</el-button> -->
-        <el-button type="text" size="mini" v-if="(row.status == 'Delivering'  || row.status == 'Sent') && row.isSubmitted == 1" @click="sendGoodsDetail(row)">发货明细</el-button>
+        <el-button type="text" size="mini"
+          v-if="(row.status == 'Delivering' || row.status == 'Sent') && row.isSubmitted == 1"
+          @click="sendGoodsDetail(row)">发货明细</el-button>
       </template>
     </vxe-column>
   </vxe-table>
@@ -146,31 +143,31 @@ import Format from '@/benyun/utils/dateFormat'
 @Component
 export default class OrderTable extends Vue {
   @Prop()
-  data!:Array<any>
-  height=null
+  data!: Array<any>
+  height = null
 
-  operationFlag:any={
-    'OMS':'手工下单',
-    'COPY':'复制',
-    'MERGE':'合并',
-    'SPLIT':'拆分;拆分还原',
-    'MOBILE':'导入',
-    'DRP-S':'供销推送',
-    'DRP-D':'分销推送',
-    'KWAISHOP':'快手;微商城',
-    'PINDUODUO':'拼多多',
-    'TOUTIAOFXG':'头条放心购',
-    'JUSHUITAN':'聚水潭'
+  operationFlag: any = {
+    'OMS': '手工下单',
+    'COPY': '复制',
+    'MERGE': '合并',
+    'SPLIT': '拆分;拆分还原',
+    'MOBILE': '导入',
+    'DRP-S': '供销推送',
+    'DRP-D': '分销推送',
+    'KWAISHOP': '快手;微商城',
+    'PINDUODUO': '拼多多',
+    'TOUTIAOFXG': '头条放心购',
+    'JUSHUITAN': '聚水潭'
   }
   //禁止点三订单勾选
-  checCheckboxkMethod({row}){
+  checCheckboxkMethod({ row }) {
     return row.upSourceName !== 'DS_JUSHUITAN'
     // return row.upSourceName !== 'OPENB2B_U8'
   }
   //转换售卖类型
-  getSellType(n:any) {
+  getSellType(n: any) {
     let name = ''
-    switch(n) {
+    switch (n) {
       case '1':
         name = '自营';
         break;
@@ -190,15 +187,15 @@ export default class OrderTable extends Vue {
     return name;
   }
   //订单来源转换文字信息
-  getFromText(f:any){
-    let t='';
-    if(f){
-      let arr:Array<any>=f.split(',');
-      for(const item of arr){
-        if(this.operationFlag[item]){
-          if(t){
+  getFromText(f: any) {
+    let t = '';
+    if (f) {
+      let arr: Array<any> = f.split(',');
+      for (const item of arr) {
+        if (this.operationFlag[item]) {
+          if (t) {
             t = t + ' , ' + this.operationFlag[item]
-          }else{
+          } else {
             t = this.operationFlag[item]
           }
         }
@@ -207,94 +204,97 @@ export default class OrderTable extends Vue {
     return t;
   }
   //是否显示发货
-  showSend(item:any){
-    let noStatus = ['WaitPay','Delivering','Merged','Split','Question','Sent','Cancelled'];
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && noStatus.indexOf(item.status) == -1){
+  showSend(item: any) {
+    let noStatus = ['WaitPay', 'Delivering', 'Merged', 'Split', 'Question', 'Sent', 'Cancelled'];
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && noStatus.indexOf(item.status) == -1) {
       return true
     }
     return false
   }
   //合并按钮是否显示
-  showMerge(item:any){
+  showMerge(item: any) {
     let r = false;
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1 
-    && item.operationFlag.indexOf('JUSHUITAN') == -1)){
-      if(item.status == 'WaitConfirm' || item.status == 'Question'){
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1
+      && item.operationFlag.indexOf('JUSHUITAN') == -1)) {
+      if (item.status == 'WaitConfirm' || item.status == 'Question') {
         r = true;
       }
     }
     return r;
   }
-  showSplit(item:any){
+  showSplit(item: any) {
     let r = false;
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1 
-    && item.operationFlag.indexOf('JUSHUITAN') == -1)){
-      let s=['WaitConfirm','Question','Split']
-      if(s.indexOf(item.status) >= 0){
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1
+      && item.operationFlag.indexOf('JUSHUITAN') == -1)) {
+      let s = ['WaitConfirm', 'Question', 'Split']
+      if (s.indexOf(item.status) >= 0) {
         r = true;
       }
     }
     return r;
   }
 
-  formatDate(v:string){
-    return Format(v,'yyyy-MM-dd');
+  formatDate(v: string) {
+    return Format(v, 'yyyy-MM-dd');
   }
- 
-  mounted(){
+
+  mounted() {
     this.$nextTick(() => {
       this.height = (this as any).$el.offsetHeight;
     })
   }
-  detail(row:any){
-    this.$emit('detail',row)
+  detail(row: any) {
+    this.$emit('detail', row)
   }
-  getSelectData(){
+  getSelectData() {
     let data = (this as any).$lodash.cloneDeep((this.$refs.table as any).getCheckboxRecords());
     return data;
   }
-  sendGoods(row:any){
-    this.$emit('sendGoods',row)
+  sendGoods(row: any) {
+    this.$emit('sendGoods', row)
   }
-  sendGoodsDetail(row:any){
-    this.$emit('sendGoodsDetail',row)
+  sendGoodsDetail(row: any) {
+    this.$emit('sendGoodsDetail', row)
   }
-  mergeHandle(row:any){
+  mergeHandle(row: any) {
     let v = (this as any).$lodash.cloneDeep(row);
     v.isMain = 1;
-    let data:Array<any> = [];
+    let data: Array<any> = [];
     data.push(v);
-    for(const item of this.data){
-      if(row.id != item.id && item.isSubmitted == 1 && row.buyerId == item.buyerId &&  row.receiverMobile == item.receiverMobile && row.receiverProvince == item.receiverProvince && row.receiverCity == item.receiverCity && row.receiverDistrict == item.receiverDistrict && row.receiverTown == item.receiverTown && row.receiverAddress == item.receiverAddress  && item.pays && item.pays.length > 0 && item.operationFlag.indexOf('SPLIT') == -1 && 
-      item.operationFlag.indexOf('MERGE') == -1 && (item.status == 'WaitConfirm' || item.status == 'Question')){
+    for (const item of this.data) {
+      if (row.id != item.id && item.isSubmitted == 1 && row.buyerId == item.buyerId && row.receiverMobile == item.receiverMobile && row.receiverProvince == item.receiverProvince && row.receiverCity == item.receiverCity && row.receiverDistrict == item.receiverDistrict && row.receiverTown == item.receiverTown && row.receiverAddress == item.receiverAddress && item.pays && item.pays.length > 0 && item.operationFlag.indexOf('SPLIT') == -1 &&
+        item.operationFlag.indexOf('MERGE') == -1 && (item.status == 'WaitConfirm' || item.status == 'Question')) {
         data.push(item);
       }
     }
-    this.$emit('mergeHandle',data);
+    this.$emit('mergeHandle', data);
   }
-  splitHandle(row:any){
-    this.$emit('splitHandle',row);
+  splitHandle(row: any) {
+    this.$emit('splitHandle', row);
   }
 }
 </script>
 
 <style lang="scss" scoped>
-.detail{
+.detail {
   color: #0089ff;
   cursor: pointer;
 }
-.col-cont{
+
+.col-cont {
+
   // display: flex;
   // justify-content: space-between;
   // align-items: center;
   // flex-direction: column;
-  .update{
+  .update {
     display: flex;
     justify-content: flex-end;
     width: 100%;
     visibility: hidden;
   }
-  .tag-update{
+
+  .tag-update {
     height: 24px;
     width: 24px;
     font-size: 12px;
@@ -302,37 +302,41 @@ export default class OrderTable extends Vue {
     justify-content: center;
     align-items: center;
     border-radius: 50%;
-    background-color:#2d99f7;
+    background-color: #2d99f7;
     color: #FFF;
     flex-shrink: 0;
     margin-left: 4px;
     cursor: pointer;
   }
-  .tag-update:hover{
+
+  .tag-update:hover {
     opacity: 0.7;
   }
 }
 </style>
 
 <style lang="scss">
-.row--hover{
-  .update{
-    visibility:visible !important;
+.row--hover {
+  .update {
+    visibility: visible !important;
   }
 }
-.row--current{
-  .update{
-    visibility:visible !important;
+
+.row--current {
+  .update {
+    visibility: visible !important;
   }
 }
-.image-slot{
-  .el-icon-picture-outline{
+
+.image-slot {
+  .el-icon-picture-outline {
     font-size: 28px;
     color: #999;
   }
 }
-.item-pro{
-  .el-badge__content{
+
+.item-pro {
+  .el-badge__content {
     z-index: 1;
   }
 }

+ 20 - 11
src/views/oms/B2BOrder/components/orderTool.vue

@@ -10,7 +10,7 @@
     <el-button type="text" @click="handle('importOrder')">导入订单</el-button>
     <div class="split"></div>
     <el-dropdown split-button type="text" @click="handle('smt')" @command="handleCommand">
-        审核
+      审核
       <el-dropdown-menu slot="dropdown">
         <el-dropdown-item command="reSmt">反审核</el-dropdown-item>
       </el-dropdown-menu>
@@ -25,7 +25,8 @@
     <div class="split"></div>
     <el-button type="text" @click="handle('changeQues')">转异常</el-button>
     <el-button type="text" @click="handle('changeNormal')">转正常</el-button>
-    <el-button type="text" @click="handle('cancelOrder')">取消订单<i class="el-icon-info" title="只有[待付款,发货中,异常,已付款待审核,等供销商|外仓发货,已客审待财审]才可以取消订单"></i></el-button>
+    <el-button type="text" @click="handle('cancelOrder')">取消订单<i class="el-icon-info"
+        title="只有[待付款,发货中,异常,已付款待审核,等供销商|外仓发货,已客审待财审]才可以取消订单"></i></el-button>
     <!-- <el-dropdown split-button type="text" class="dropdown" @click="handle('cancelOrder')" @command="handleCommand">
       取消订单
       <i class="el-icon-info" title="只有[待付款,发货中,异常,已付款待审核,等供销商|外仓发货,已客审待财审]才可以取消订单"></i>
@@ -48,9 +49,14 @@
     <el-button type="text" @click="handle('producePurchase')" title="选取已审核数据">生成采购单</el-button>
     <el-button type="text" @click="handle('orderFile')">订单归档</el-button>
     <div class="split"></div>
-    <el-button type="text" @click="handle('autoMerge')">自动合并<i class="el-icon-info" title="自动合并条件:已付款,已审核,同一个买家/分销商,同一个发货地址,未合并,未拆分"></i></el-button>
-    <el-button type="text" @click="handle('autoSplit')">自动拆分<i class="el-icon-info" title="自动拆分条件:已付款,已审核,未合并"></i></el-button>
-    <el-button type="text" @click="handle('batchSendGoods')">发货<i class="el-icon-info" title="发货条件:已审核,待付款,已付款待审核"></i></el-button>
+    <el-button type="text" @click="handle('autoMerge')">自动合并<i class="el-icon-info"
+        title="自动合并条件:已付款,已审核,同一个买家/分销商,同一个发货地址,未合并,未拆分"></i></el-button>
+    <el-button type="text" @click="handle('autoSplit')">自动拆分<i class="el-icon-info"
+        title="自动拆分条件:已付款,已审核,未合并"></i></el-button>
+    <el-button type="text" @click="handle('batchSendGoods')">发货<i class="el-icon-info"
+        title="发货条件:已审核,待付款,已付款待审核"></i></el-button>
+    <el-button type="text" @click="handle('autoAudit')">智能审核<i class="el-icon-info"
+        title="条件:未发货,未审核的订单"></i></el-button>
   </div>
 </template>
 
@@ -59,32 +65,35 @@ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 @Component
 export default class OrderTool extends Vue {
 
-  handleCommand(n:string){
+  handleCommand(n: string) {
     this.$emit(n)
   }
 
-  handle(n:string){
+  handle(n: string) {
     this.$emit(n)
   }
 }
 </script>
 
 <style lang="scss" scoped>
-.order-tool{
+.order-tool {
   height: 40px;
   display: flex;
   align-items: center;
   width: 100%;
-  .order-tool-btn{
+
+  .order-tool-btn {
     color: #333;
   }
-  .split{
+
+  .split {
     height: 10px;
     width: 1px;
     background-color: #CCC;
     margin: 0 8px;
   }
-  .dropdown{
+
+  .dropdown {
     padding-left: 8px;
   }
 }

文件差異過大導致無法顯示
+ 363 - 341
src/views/oms/B2BOrder/index.vue


文件差異過大導致無法顯示
+ 383 - 364
src/views/oms/B2COrder/index.vue


+ 86 - 84
src/views/oms/account/components/orderTable.vue

@@ -1,11 +1,5 @@
 <template>
-  <vxe-table
-    size="mini"
-    border
-    stripe
-    ref="table"
-    :height="height"
-    :row-config="{isCurrent: true,isHover: true}"
+  <vxe-table size="mini" border stripe ref="table" :height="height" :row-config="{ isCurrent: true, isHover: true }"
     :data="data">
     <vxe-column field="id" title="内部订单号" width="100">
       <template #default="{ row }">
@@ -27,8 +21,9 @@
     </vxe-column>
     <vxe-column field="product" title="商品" width="140">
       <template #default="{ row }">
-        <el-badge :value="item.qty" class="item-pro" type="primary" :max="99" v-for="(item,index) of row.items" :key="index">
-          <el-image  style="width: 28px; height: 28px">
+        <el-badge :value="item.qty" class="item-pro" type="primary" :max="99" v-for="(item, index) of row.items"
+          :key="index">
+          <el-image style="width: 28px; height: 28px">
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i>
             </div>
@@ -80,7 +75,7 @@
     <vxe-column field="weight" title="重量" width="70"></vxe-column>
     <vxe-column field="isCod" title="是否货到付款" width="120">
       <template #default="{ row }">
-        {{ row.isCod == 1 ? '是' :' 否' }}
+        {{ row.isCod == 1 ? '是' : ' 否' }}
       </template>
     </vxe-column>
     <vxe-column field="sendDate" title="发货日期" width="120"></vxe-column>
@@ -95,8 +90,8 @@
     <vxe-column field="freeAmount" title="抵扣金额" align="right" width="120"></vxe-column>
     <vxe-column field="payAmount" title="应付+运费" align="right" width="120">
       <template #default="{ row }">
-        <span>{{ row.payAmount }}</span> <br/>
-        <span style="color: #b9b8b8;">{{ row.freight?row.freight:0 }}</span>
+        <span>{{ row.payAmount }}</span> <br />
+        <span style="color: #b9b8b8;">{{ row.freight ? row.freight : 0 }}</span>
       </template>
     </vxe-column>
     <vxe-column field="paidAmount" title="实付金额" align="right" width="120"></vxe-column>
@@ -106,8 +101,8 @@
     <!-- <vxe-column field="invoiceType" title="发票类型" width="120"></vxe-column> -->
     <vxe-column field="invoiceTitle" title="发票抬头+税号" width="120">
       <template #default="{ row }">
-        <span>{{ row.invoiceTitle }}</span> <br/>
-        <span style="color: #b9b8b8;">{{ row.buyerTaxNo }}</span><br/>
+        <span>{{ row.invoiceTitle }}</span> <br />
+        <span style="color: #b9b8b8;">{{ row.buyerTaxNo }}</span><br />
         <span>{{ row.invoiceType }}</span>
       </template>
     </vxe-column>
@@ -120,26 +115,26 @@ import Format from '@/benyun/utils/dateFormat'
 @Component
 export default class OrderTable extends Vue {
   @Prop()
-  data!:Array<any>
-  height=null
+  data!: Array<any>
+  height = null
 
-  operationFlag:any={
-    'OMS':'手工下单',
-    'COPY':'复制',
-    'MERGE':'合并',
-    'SPLIT':'拆分;拆分还原',
-    'MOBILE':'导入',
-    'DRP-S':'供销推送',
-    'DRP-D':'分销推送',
-    'KWAISHOP':'快手;微商城',
-    'PINDUODUO':'拼多多',
-    'TOUTIAOFXG':'头条放心购',
-    'JUSHUITAN':'聚水潭'
+  operationFlag: any = {
+    'OMS': '手工下单',
+    'COPY': '复制',
+    'MERGE': '合并',
+    'SPLIT': '拆分;拆分还原',
+    'MOBILE': '导入',
+    'DRP-S': '供销推送',
+    'DRP-D': '分销推送',
+    'KWAISHOP': '快手;微商城',
+    'PINDUODUO': '拼多多',
+    'TOUTIAOFXG': '头条放心购',
+    'JUSHUITAN': '聚水潭'
   }
   //转换售卖类型
-  getSellType(n:any) {
+  getSellType(n: any) {
     let name = ''
-    switch(n) {
+    switch (n) {
       case '1':
         name = '自营';
         break;
@@ -159,15 +154,15 @@ export default class OrderTable extends Vue {
     return name;
   }
   //订单来源转换文字信息
-  getFromText(f:any){
-    let t='';
-    if(f){
-      let arr:Array<any>=f.split(',');
-      for(const item of arr){
-        if(this.operationFlag[item]){
-          if(t){
+  getFromText(f: any) {
+    let t = '';
+    if (f) {
+      let arr: Array<any> = f.split(',');
+      for (const item of arr) {
+        if (this.operationFlag[item]) {
+          if (t) {
             t = t + ' , ' + this.operationFlag[item]
-          }else{
+          } else {
             t = this.operationFlag[item]
           }
         }
@@ -176,94 +171,97 @@ export default class OrderTable extends Vue {
     return t;
   }
   //是否显示发货
-  showSend(item:any){
-    let noStatus = ['WaitPay','Delivering','Merged','Split','Question','Sent','Cancelled'];
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && noStatus.indexOf(item.status) == -1){
+  showSend(item: any) {
+    let noStatus = ['WaitPay', 'Delivering', 'Merged', 'Split', 'Question', 'Sent', 'Cancelled'];
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && noStatus.indexOf(item.status) == -1) {
       return true
     }
     return false
   }
   //合并按钮是否显示
-  showMerge(item:any){
+  showMerge(item: any) {
     let r = false;
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1 
-    && item.operationFlag.indexOf('JUSHUITAN') == -1)){
-      if(item.status == 'WaitConfirm' || item.status == 'Question'){
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1
+      && item.operationFlag.indexOf('JUSHUITAN') == -1)) {
+      if (item.status == 'WaitConfirm' || item.status == 'Question') {
         r = true;
       }
     }
     return r;
   }
-  showSplit(item:any){
+  showSplit(item: any) {
     let r = false;
-    if(item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1 
-    && item.operationFlag.indexOf('JUSHUITAN') == -1)){
-      let s=['WaitConfirm','Question','Split']
-      if(s.indexOf(item.status) >= 0){
+    if (item.isSubmitted == 1 && item.pays && item.pays.length > 0 && (!item.operationFlag || item.operationFlag.indexOf('MERGE') == -1 && item.operationFlag.indexOf('SPLIT') == -1
+      && item.operationFlag.indexOf('JUSHUITAN') == -1)) {
+      let s = ['WaitConfirm', 'Question', 'Split']
+      if (s.indexOf(item.status) >= 0) {
         r = true;
       }
     }
     return r;
   }
 
-  formatDate(v:string){
-    return Format(v,'yyyy-MM-dd');
+  formatDate(v: string) {
+    return Format(v, 'yyyy-MM-dd');
   }
 
-  mounted(){
+  mounted() {
     this.$nextTick(() => {
       this.height = (this as any).$el.offsetHeight;
     })
   }
-  detail(row:any){
-    this.$emit('detail',row)
+  detail(row: any) {
+    this.$emit('detail', row)
   }
-  getSelectData(){
+  getSelectData() {
     let data = (this as any).$lodash.cloneDeep((this.$refs.table as any).getCheckboxRecords());
     return data;
   }
-  sendGoods(row:any){
-    this.$emit('sendGoods',row)
+  sendGoods(row: any) {
+    this.$emit('sendGoods', row)
   }
-  sendGoodsDetail(row:any){
-    this.$emit('sendGoodsDetail',row)
+  sendGoodsDetail(row: any) {
+    this.$emit('sendGoodsDetail', row)
   }
-  mergeHandle(row:any){
+  mergeHandle(row: any) {
     let v = (this as any).$lodash.cloneDeep(row);
     v.isMain = 1;
-    let data:Array<any> = [];
+    let data: Array<any> = [];
     data.push(v);
-    for(const item of this.data){
-      if(row.id != item.id && item.isSubmitted == 1 && row.buyerId == item.buyerId &&  row.receiverMobile == item.receiverMobile && row.receiverProvince == item.receiverProvince && row.receiverCity == item.receiverCity && row.receiverDistrict == item.receiverDistrict && row.receiverTown == item.receiverTown && row.receiverAddress == item.receiverAddress  && item.pays && item.pays.length > 0 && item.operationFlag.indexOf('SPLIT') == -1 && 
-      item.operationFlag.indexOf('MERGE') == -1 && (item.status == 'WaitConfirm' || item.status == 'Question')){
+    for (const item of this.data) {
+      if (row.id != item.id && item.isSubmitted == 1 && row.buyerId == item.buyerId && row.receiverMobile == item.receiverMobile && row.receiverProvince == item.receiverProvince && row.receiverCity == item.receiverCity && row.receiverDistrict == item.receiverDistrict && row.receiverTown == item.receiverTown && row.receiverAddress == item.receiverAddress && item.pays && item.pays.length > 0 && item.operationFlag.indexOf('SPLIT') == -1 &&
+        item.operationFlag.indexOf('MERGE') == -1 && (item.status == 'WaitConfirm' || item.status == 'Question')) {
         data.push(item);
       }
     }
-    this.$emit('mergeHandle',data);
+    this.$emit('mergeHandle', data);
   }
-  splitHandle(row:any){
-    this.$emit('splitHandle',row);
+  splitHandle(row: any) {
+    this.$emit('splitHandle', row);
   }
 }
 </script>
 
 <style lang="scss" scoped>
-.detail{
+.detail {
   color: #0089ff;
   cursor: pointer;
 }
-.col-cont{
+
+.col-cont {
+
   // display: flex;
   // justify-content: space-between;
   // align-items: center;
   // flex-direction: column;
-  .update{
+  .update {
     display: flex;
     justify-content: flex-end;
     width: 100%;
     visibility: hidden;
   }
-  .tag-update{
+
+  .tag-update {
     height: 24px;
     width: 24px;
     font-size: 12px;
@@ -271,37 +269,41 @@ export default class OrderTable extends Vue {
     justify-content: center;
     align-items: center;
     border-radius: 50%;
-    background-color:#2d99f7;
+    background-color: #2d99f7;
     color: #FFF;
     flex-shrink: 0;
     margin-left: 4px;
     cursor: pointer;
   }
-  .tag-update:hover{
+
+  .tag-update:hover {
     opacity: 0.7;
   }
 }
 </style>
 
 <style lang="scss">
-.row--hover{
-  .update{
-    visibility:visible !important;
+.row--hover {
+  .update {
+    visibility: visible !important;
   }
 }
-.row--current{
-  .update{
-    visibility:visible !important;
+
+.row--current {
+  .update {
+    visibility: visible !important;
   }
 }
-.image-slot{
-  .el-icon-picture-outline{
+
+.image-slot {
+  .el-icon-picture-outline {
     font-size: 28px;
     color: #999;
   }
 }
-.item-pro{
-  .el-badge__content{
+
+.item-pro {
+  .el-badge__content {
     z-index: 1;
   }
 }

+ 70 - 0
src/views/orderConfig/orderTimeConfig/compoments/addConfig.vue

@@ -0,0 +1,70 @@
+<template>
+    <vxe-modal v-model="value" id="addConfig" width="400" v-loading="load" @hide="hide" height="200" show-footer
+        title="新增超时时间">
+        <by-form :propConfig="config" ref="form"></by-form>
+        <template #footer>
+            <div class="btn">
+                <el-button plain size="small" @click="value = false">取消</el-button>
+                <el-button type="primary" size="small" @click="btn">确定</el-button>
+            </div>
+        </template>
+    </vxe-modal>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { addOrderTimeConfig } from '@/api/orderConfig'
+@Component({ components: {} })
+export default class AddQuestModel extends Vue {
+    value = false;
+    load = false;
+    config: any = {
+        attr: {
+            rules: {
+                timeout: [
+                    { required: true, message: '超时时间不能为空!', trigger: 'blur' }
+                ]
+            }
+        },
+        columns: [
+            [{
+                label: '超时时间(小时)',
+                prop: 'timeout',
+                labelWidth: '120px',
+                component: 'by-input'
+            }]
+        ]
+    }
+
+    @Prop({
+        type: Number,
+        default: 1
+    })
+    isSystem?: number
+
+    hide() {
+        (this.$refs.form as any).clearValidate();
+        (this.$refs.form as any).clearValue();
+    }
+    setShow(v: boolean) {
+        this.value = v;
+    }
+    btn() {
+        (this.$refs.form as any).validate({ noMsg: true }).then(() => {
+            let data = (this.$refs.form as any).getValue() as { timeout: number };
+            data.timeout = Number(data.timeout);
+            //data.isSystem = this.isSystem;
+            this.load = true;
+            addOrderTimeConfig(data).then(() => {
+                this.load = false;
+                this.$emit('handleSuccess');
+                this.value = false;
+            }).catch(() => {
+                this.load = false;
+            })
+        }).catch(() => { })
+    }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 137 - 0
src/views/orderConfig/orderTimeConfig/index.vue

@@ -0,0 +1,137 @@
+<template>
+    <div class="view" id="labelPage" v-loading="load">
+        <by-tool :propConfig="tool" v-if="userInfo && userInfo.userName == 'admin'" class="tool"
+            @clickHandle="clickHandle" id="configTool" />
+        <!-- <module-view :propConfig="config" ref="view" @pagination="getList" @onRefresh="getList" /> -->
+        <by-table :propConfig="tableConfig" ref="table">
+            <template v-slot:ordered="{ row }">
+                <vxe-input v-if="userInfo && userInfo.userName == 'admin'" v-model="row.ordered" size="small"
+                    type="number"></vxe-input>
+                <span v-else>{{ row.ordered }}</span>
+            </template>
+        </by-table>
+        <add-config ref="addConfig" @handleSuccess="getList" />
+    </div>
+
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { queryOrderTimeConfig, IOrderTimeConfigItem, IOrderTimeConfigRequest, IOrderTimeResponse, delOrderTimeConfig } from '@/api/orderConfig';
+import addConfig from './compoments/addConfig.vue';
+@Component({ components: { addConfig } })
+export default class OrderConfig extends Vue {
+    isHasOne = false;//是否有一条数据
+    userInfo: any = {};
+    tool = {
+        tools: {
+            add: true,
+            refresh: true
+        },
+        audit: {}
+    }
+    tableConfig: any = {
+        attr: {
+            size: 'mini',
+            align: 'center',
+            seq: true
+        },
+        columns: [{
+            title: '超时时间',
+            field: 'timeout'
+        }, {
+            title: '创建于',
+            field: 'createTime',
+            width: 150,
+        }, {
+            title: '操作',
+            action: true,
+            width: 200,
+            plugins: [{
+                name: '删除',
+                event: {
+                    show: () => {
+                        let userInfo = this.$store.getters.userInfo;
+                        if (userInfo && userInfo.userName == 'admin') {
+                            return true
+                        } else {
+                            return false
+                        }
+                    },
+                    click: (row: any) => {
+                        this.delHandle(row);
+                    }
+                }
+            }]
+        }]
+    }
+    time: any;
+    timeNum = 0;
+    data: Array<any> = []
+    load = false;
+
+
+    async getList() {
+        this.load = true;
+        const res = await queryOrderTimeConfig({ pageSize: 20, pageNum: 1 }) as IOrderTimeResponse<IOrderTimeConfigItem[]>;
+        this.load = false;
+        if (res.code != 200) {
+            return;
+        }
+        this.isHasOne = res.rows.length > 0;
+        (this.$refs.table as any).setValue(res.rows);
+    }
+    clickHandle(e: string) {
+        if (e == 'onAdd') {
+            if (this.isHasOne) {
+                this.$message.warning('最多只能添加一条数据');
+                return;
+            }
+            (this.$refs.addConfig as any).setShow(true)
+        }
+        if (e == 'onRefresh') {
+            this.getList();
+        }
+    }
+    async delHandle(row: any) {
+        const confirm = await this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+        }).catch(() => {
+            this.load = false;
+        })
+        if (!confirm) return;
+        this.load = true;
+        const res = await delOrderTimeConfig(row.id) as IOrderTimeResponse<string>;
+        this.load = false;
+        if (res.code != 200) {
+            this.$message.error(res.msg);
+            return;
+        }
+        this.getList();
+    }
+
+    created() {
+        this.userInfo = this.$store.getters.userInfo;
+    }
+    mounted() {
+        this.$nextTick(() => {
+            this.getList()
+        })
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.view {
+    width: 100%;
+    height: 100%;
+    padding: 16px;
+    box-sizing: border-box;
+
+    .tool {
+        padding-bottom: 16px;
+    }
+}
+</style>

+ 112 - 0
src/views/waterShop/waterShop/index.vue

@@ -0,0 +1,112 @@
+<template>
+    <div class="view" id="labelPage" v-loading="load">
+        <by-tool :propConfig="tool" v-if="userInfo && userInfo.userName == 'admin'" class="tool"
+            @clickHandle="clickHandle" id="configTool" />
+        <!-- <module-view :propConfig="config" ref="view" @pagination="getList" @onRefresh="getList" /> -->
+        <by-table :propConfig="tableConfig" ref="table">
+            <template v-slot:ordered="{ row }">
+                <vxe-input v-if="userInfo && userInfo.userName == 'admin'" v-model="row.ordered" size="small"
+                    type="number"></vxe-input>
+                <span v-else>{{ row.ordered }}</span>
+            </template>
+        </by-table>
+    </div>
+
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { query, IShopResponse } from '@/api/shop'
+@Component({ components: {} })
+export default class OrderConfig extends Vue {
+    isHasOne = false;//是否有一条数据
+    userInfo: any = {};
+    tool = {
+        tools: {
+            add: true,
+            refresh: true
+        },
+        audit: {}
+    }
+    tableConfig: any = {
+        attr: {
+            size: 'mini',
+            align: 'center',
+            seq: true
+        },
+        columns: [{
+            title: '店铺编号',
+            field: 'shopId'
+        }, {
+            title: '店铺名称',
+            field: 'shopName'
+        }, {
+            title: '创建于',
+            field: 'createTime',
+            width: 150,
+        }]
+    }
+    time: any;
+    timeNum = 0;
+    data: Array<any> = []
+    load = false;
+
+
+    async getMyList() {
+        // this.load = true;
+        // const res = await query({ pageSize: 2000, pageNum: 1 }) as IShopResponse<any>;
+        // this.load = false;
+        // if (res.code != 200) {
+        //     return;
+        // }
+        // this.isHasOne = res.rows.length > 0;
+        // (this.$refs.table as any).setValue(res.rows);
+    }
+
+    async getList() {
+        // this.load = true;
+        // const res = await queryOrderTimeConfig({ pageSize: 20, pageNum: 1 }) as IOrderTimeResponse<IOrderTimeConfigItem[]>;
+        // this.load = false;
+        // if (res.code != 200) {
+        //     return;
+        // }
+        // this.isHasOne = res.rows.length > 0;
+        // (this.$refs.table as any).setValue(res.rows);
+    }
+    clickHandle(e: string) {
+        if (e == 'onAdd') {
+            if (this.isHasOne) {
+                this.$message.warning('最多只能添加一条数据');
+                return;
+            }
+            (this.$refs.addConfig as any).setShow(true)
+        }
+        if (e == 'onRefresh') {
+            this.getList();
+        }
+    }
+
+
+    created() {
+        this.userInfo = this.$store.getters.userInfo;
+    }
+    mounted() {
+        this.$nextTick(() => {
+            this.getList()
+        })
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.view {
+    width: 100%;
+    height: 100%;
+    padding: 16px;
+    box-sizing: border-box;
+
+    .tool {
+        padding-bottom: 16px;
+    }
+}
+</style>

部分文件因文件數量過多而無法顯示