Browse Source

拉取聚水潭订单

逆水行舟 1 tháng trước cách đây
mục cha
commit
446f29c15d

+ 9 - 0
src/api/omsOrder.ts

@@ -368,6 +368,15 @@ export function waterShop() {
   });
 }
 
+//同步订单
+export function syncOrder(data: any) {
+  return request({
+    url: "/omsOrder/customOrder/querySaleOrder",
+    method: "POST",
+    data: data,
+  });
+}
+
 export interface IResponeData<T> {
   msg: string;
   code: number;

+ 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.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImQ5MTczMzYxLTc4MzItNGRkNS1iN2MyLTNlOGNhYTZjMGY0MCIsInVzZXJuYW1lIjoiYWRtaW4ifQ.fh2GVuro03RgoAmSqyFQJvYz2Ls8rxUfGq2qZSZaTeYi5HfqB20wx_0JX5FMsLS2Y-PDniWRZ89iiwmr_k7nyQ";
+    return "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjdkZjhjYjIyLTMwMmMtNDFhZS1iNjRjLTc3NzYxOTlmZTI1MyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.8ndcPiq0ZCXlRfIhBt71SGXMSCwNZyk88zcuuE7YgNo_uN_iBirzH-IschSiRwlyN9Co37j4gvwSUZ-AstpClw";
   } else {
     return Cookies.get(TokenKey);
   }

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

@@ -67,7 +67,7 @@ export default class LiveView extends Vue {
             field: 'operator'
         }, {
             title: '时间',
-            field: 'time',
+            field: 'createTime',
         }]
     }
     setShow(v: boolean) {

+ 23 - 19
src/views/audit/store/index.vue

@@ -221,29 +221,33 @@ export default class Store extends Vue {
 	//刷新极智嘉库存
 	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
-		}
-		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
+		try {
+			let items = [item.skuCode]
+			//调用api.getJZJInventory
+			const res = await api.getJZJInventory({ wareHouseCode: '', items: items })
+			if (res.data.code != 200) {
+				this.$message.error(res.data.message)
+				return
+			}
+			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.$refs.moduleView as any).setTableValue(this.tableInfo);
+		} catch (error) {
+			console.error(error);
+		} finally {
+			loading.close();
 		}
-		loading.close();
-		(this.$refs.moduleView as any).setTableValue(this.tableInfo);
 	}
 	// 获取列表数据
 	getDataList() {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 452 - 428
src/views/oms/B2COrder/components/addOrder.vue


+ 160 - 119
src/views/oms/B2COrder/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>
@@ -63,11 +57,11 @@
       </template>
     </vxe-column>
     <vxe-column field="upSourceName" title="来源渠道" width="110"></vxe-column>
-    <vxe-column field="operationFlag" title="操作标记" width="120">
+    <!-- <vxe-column field="operationFlag" title="操作标记" width="120">
       <template #default="{ row }">
         {{ getFromText(row.operationFlag) }}
       </template>
-    </vxe-column>
+    </vxe-column> -->
     <vxe-column field="shopName" title="店铺名称" width="140"></vxe-column>
     <vxe-column field="shopSite" title="平台渠道" width="140"></vxe-column>
     <vxe-column field="orderDate" title="订单日期" width="140">
@@ -75,62 +69,102 @@
         {{ formatDate(row.orderDate) }}
       </template> -->
     </vxe-column>
-    <!-- <vxe-column field="shipment" title="跨境买家指定物流" width="120"></vxe-column> -->
-    <vxe-column field="chosenChannel" title="实发快递渠道" width="120"></vxe-column>
-    <vxe-column field="logisticsId" title="快递单号" width="120"></vxe-column>
-    <vxe-column field="logisticsCompany" title="快递公司" width="120"></vxe-column>
-    <vxe-column field="logisticsCompanyCode" title="物流公司编码" width="120"></vxe-column>
+    <vxe-column field="buyerNickname" title="买家昵称" width="120"></vxe-column>
+    <vxe-column title="收货人" width="120">
+      <template #default="{ row }">
+        ***
+      </template>
+    </vxe-column>
+    <vxe-column title="手机号" width="120">
+      <template #default="{ row }">
+        ***********
+      </template>
+    </vxe-column>
+    <vxe-column title="收货地址" width="120">
+      <template #default="{ row }">
+        **** *** ***** *****
+      </template>
+    </vxe-column>
+    <!-- <vxe-column field="chosenChannel" title="实发快递渠道" width="120"></vxe-column> -->
+    <vxe-column field="weight" title="预估重量" width="120"></vxe-column>
+    <vxe-column field="factWeight" title="实际重量" width="120"></vxe-column>
+
+    <vxe-column title="买家支付运费+应付金额" width="120">
+      <template #default="{ row }">
+        <span style="color: #b9b8b8;">{{ row.factFreight ? row.factFreight : 0 }}</span> <br />
+        <span>{{ row.payAmount }}</span>
+      </template>
+    </vxe-column>
+    <vxe-column field="payAmount" title="应付金额" width="120"></vxe-column>
+    <vxe-column field="payDate" title="付款日期" width="120"></vxe-column>
+
+    <vxe-column field="logisticsId" title="快递(物流)单号" width="120"></vxe-column>
+    <vxe-column field="logisticsCompany" title="快递公司+编码" width="120">
+      <template #default="{ row }">
+        {{ row.logisticsCompany }} {{ row.logisticsCompanyCode }}
+      </template>
+    </vxe-column>
+    <!-- <vxe-column field="logisticsCompanyCode" title="物流公司编码" width="120"></vxe-column> -->
     <!-- <vxe-column field="internationalLogisticsId" title="国际物流单号" width="120"></vxe-column> -->
     <!-- <vxe-column field="skus" title="skus" width="120"></vxe-column> -->
-    <vxe-column field="weight" title="重量" width="70"></vxe-column>
-    <vxe-column field="isCod" title="是否货到付款" width="120">
+    <!-- <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>
+    </vxe-column> -->
+
+    <vxe-column field="outBoundOrderNo" title="出库单号" width="120"></vxe-column>
+    <vxe-column field="outBoundTime" title="出库时间" width="120"></vxe-column>
+    <vxe-column field="mergeOrderNo" title="合并订单号" width="120"></vxe-column>
+    <vxe-column field="remark" title="线下备注" width="120"></vxe-column>
+    <vxe-column field="orderStaffName" title="业务员名称" width="120"></vxe-column>
+
+    <!-- <vxe-column field="sendDate" title="发货日期" width="140"></vxe-column> -->
     <!-- <vxe-column field="signTime" title="预计送达时间" width="120"></vxe-column>
     <vxe-column field="endTime" title="确认收货时间" width="120"></vxe-column> -->
-    <vxe-column field="receiverAddress" title="收货地址" show-overflow width="160"></vxe-column>
+    <!-- <vxe-column field="receiverAddress" title="收货地址" show-overflow width="160"></vxe-column>
     <vxe-column field="receiverName" title="收件人" show-overflow width="120"></vxe-column>
     <vxe-column field="receiverMobile" title="手机" show-overflow width="120"></vxe-column>
-    <vxe-column field="buyerMessage" title="买家留言" show-overflow width="120"></vxe-column>
+    <vxe-column field="buyerMessage" title="买家留言" show-overflow width="120"></vxe-column> -->
     <!-- <vxe-column field="wmsCoId" title="发货仓编号" width="120"></vxe-column> -->
-    <vxe-column field="payDate" title="支付时间" width="140"></vxe-column>
-    <vxe-column field="freeAmount" title="抵扣金额" align="right" width="120"></vxe-column>
-    <vxe-column field="payAmount" title="应付+运费" align="right" width="120">
+    <!-- <vxe-column field="payDate" title="支付时间" width="140"></vxe-column>
+    <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>
-    <vxe-column field="buyerNickname" title="买家昵称" show-overflow width="140"></vxe-column>
+    </vxe-column> -->
+    <!-- <vxe-column field="paidAmount" title="实付金额" align="right" width="120"></vxe-column>
+    <vxe-column field="buyerNickname" title="买家昵称" show-overflow width="140"></vxe-column> -->
     <!-- <vxe-column field="openId" title="平台买家唯一值" show-overflow width="140"></vxe-column> -->
-    <vxe-column field="buyerPaidAmount" title="总买家实付" width="120"></vxe-column>
+    <!-- <vxe-column field="buyerPaidAmount" title="总买家实付" width="120"></vxe-column>
     <vxe-column field="sellerIncomeAmount" title="总卖家实收" width="120"></vxe-column>
     <vxe-column field="questionType" title="问题类型" width="120"></vxe-column>
-    <vxe-column field="questionDesc" title="问题描述" width="120"></vxe-column>
+    <vxe-column field="questionDesc" title="问题描述" width="120"></vxe-column> -->
     <!-- <vxe-column field="invoiceType" title="发票类型" width="120"></vxe-column> -->
-    <vxe-column field="invoiceTitle" title="发票抬头+税号" width="120">
+    <!-- <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>
+    </vxe-column> -->
     <!-- <vxe-column field="buyerTaxNo" title="发票税号" width="120"></vxe-column> -->
     <!-- <vxe-column field="drpCoIdFrom" title="分销商编号" width="120"></vxe-column>
     <vxe-column field="drpCoIdTo" title="供销商编号" width="120"></vxe-column> -->
-    <vxe-column field="remark" title="订单备注" width="120"></vxe-column>
+    <!-- <vxe-column field="remark" title="订单备注" width="120"></vxe-column>
     <vxe-column field="note" title="线下备注" width="120"></vxe-column>
-    <vxe-column field="labels" title="标签" width="120"></vxe-column>
+    <vxe-column field="labels" title="标签" width="120"></vxe-column> -->
     <vxe-column title="操作" width="120" fixed="right" align="center">
       <template #default="{ row }">
         <!-- <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="showPring(row)" @click="printHandle(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>
         <!-- <h1><a href="jdprint://">打开组件</a></h1> -->
       </template>
     </vxe-column>
@@ -143,32 +177,32 @@ 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': '聚水潭'
   }
   //订单来源转换文字信息
-  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]
           }
         }
@@ -177,112 +211,115 @@ export default class OrderTable extends Vue {
     return t;
   }
   //禁止点三订单勾选
-  checCheckboxkMethod({row}){
+  checCheckboxkMethod({ row }) {
     return row.upSourceName !== 'DS_JUSHUITAN'
   }
   //是否显示发货
-  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
   }
-  showPring(row:any){
+  showPring(row: any) {
     let r = false;
-    let noStatus = ['Delivering','Merged','Split','Question','Sent','Cancelled'];
-    if(row.isSubmitted == 1 && noStatus.indexOf(row.status) == -1){
+    let noStatus = ['Delivering', 'Merged', 'Split', 'Question', 'Sent', 'Cancelled'];
+    if (row.isSubmitted == 1 && noStatus.indexOf(row.status) == -1) {
       r = true;
     }
     return r;
   }
-  printHandle(row:any){
-    this.$emit('printEvent',row)
+  printHandle(row: any) {
+    this.$emit('printEvent', row)
   }
   //合并按钮是否显示
-  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.shopId == item.shopId && row.shopName == item.shopName && 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.shopId == item.shopId && row.shopName == item.shopName && 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;
@@ -290,37 +327,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;
   }
 }

+ 1 - 0
src/views/oms/B2COrder/components/orderTool.vue

@@ -54,6 +54,7 @@
     <div class="split"></div>
     <el-button type="text" @click="handle('batchSendGoods')">发货<i class="el-icon-info"
         title="发货条件:已审核,待付款,已付款待审核"></i></el-button>
+    <el-button type="text" @click="handle('syncOrder')">同步订单</el-button>
   </div>
 </template>
 

+ 96 - 0
src/views/oms/B2COrder/components/syncOrder.vue

@@ -0,0 +1,96 @@
+<template>
+    <vxe-modal v-model="value" id="syncOrder" width="500" v-loading="load" @hide="hide" height="300" show-footer
+        title="同步订单">
+        <el-form ref="form" :model="form" label-width="100px">
+            <el-form-item label="店铺" prop="shopId">
+                <el-select v-model="form.shopId" placeholder="请选择店铺">
+                    <el-option v-for="(item, index) in shopList" :label="item.shopName"
+                        :value="item.shopId"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="起始时间" prop="modifiedBegin">
+                <el-date-picker v-model="form.modifiedBegin" type="date" value-format="yyyy-MM-dd"
+                    placeholder="请选择修改时间"></el-date-picker>
+            </el-form-item>
+            <el-form-item label="结束时间" prop="modifiedEnd">
+                <el-date-picker v-model="form.modifiedEnd" type="date" value-format="yyyy-MM-dd"
+                    placeholder="请选择修改时间"></el-date-picker>
+            </el-form-item>
+        </el-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 { IResponeData, waterShop, syncOrder } from "@/api/omsOrder";
+@Component({ components: {} })
+export default class AddConfig extends Vue {
+    value = false;
+    load = false;
+    shopList: { shopId: number, shopName: string }[] = [];
+    form = {
+        shopId: 0,
+        modifiedBegin: '',
+        modifiedEnd: ''
+    }
+    hide() {
+
+    }
+    async loadShop() {
+        this.load = true;
+        const res = await waterShop() as unknown as IResponeData<any>;
+        this.load = false;
+        if (res.code != 200) {
+            return;
+        }
+        this.shopList = res.rows
+        console.info(this.shopList)
+    }
+    setShow(v: boolean) {
+        this.loadShop();
+        this.value = v;
+    }
+    setValue(v: any) {
+    }
+    getValue() {
+
+    }
+
+    btn() {
+        if (this.form.shopId == 0) {
+            this.$message.error('请选择店铺');
+            return;
+        }
+        if (this.form.modifiedBegin == '') {
+            this.$message.error('请选择起始时间');
+            return;
+        }
+        if (this.form.modifiedEnd == '') {
+            this.$message.error('请选择结束时间');
+            return;
+        }
+        this.$confirm('确认同步订单吗?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+        }).then(() => {
+            syncOrder(this.form).then(res => {
+                this.$message.success('同步成功');
+            }).catch((err) => {
+                console.error(err);
+            }).finally(() => {
+                this.load = false;
+            })
+        })
+    }
+
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 16 - 3
src/views/oms/B2COrder/index.vue

@@ -28,7 +28,7 @@
                   <div class="ques-list" v-show="showQues">
                     <template v-for="item of questData">
                       <el-checkbox :label="item.id" v-if="item.isShow == 1" :key="item.value">{{ item.type
-                        }}</el-checkbox>
+                      }}</el-checkbox>
                     </template>
                   </div>
                 </el-collapse-transition>
@@ -112,7 +112,7 @@
           @producePurchase="producePurchase" @cancelOrder="cancelOrder" @reCancelOrder="reCancelOrder"
           @updateRmk="updateRmk" @changeQues="changeQues" @changeNormal="changeNormal" @updateSalesman="updateSalesman"
           @updateTag="updateTag" @addGift="addGift" @addProduct="addProduct" @updateFreight="updateFreight"
-          @orderFile="orderFile" @batchSendGoods="batchSendGoods" @importOrder="importOrder" />
+          @orderFile="orderFile" @batchSendGoods="batchSendGoods" @importOrder="importOrder" @syncOrder="syncOrder" />
       </div>
       <div class="table">
         <order-table :data="data" ref="orderTable" class="order-table" @detail="detail" @mergeHandle="mergeHandle"
@@ -167,6 +167,8 @@
       <express-delivery-modal ref="expressDeliveryModal" @handleSuccess="handleSuccess" />
       <!-- 上传excel -->
       <ImportExcelModel ref="ImportExcelModel" @handleSuccess="handleSuccess" />
+      <!-- 同步订单 -->
+      <SyncOrder ref="syncOrderRef" />
     </div>
   </div>
 </template>
@@ -202,13 +204,15 @@ import DeliveryDetail from "./components/deliveryDetail.vue";
 import LogisticsInfo from "./components/logisticsInfo.vue";
 import ExpressDeliveryModal from "./components/expressDeliveryModal.vue";
 import ImportExcelModel from "./components/importExcelModal.vue";
+import SyncOrder from './components/syncOrder.vue';
 import { query, getProvince, smt, unSmt, purchaseQty, unCancel, resetQuestion, archive, queryByBarCode } from '@/api/omsOrder'
 import { queryAll } from '@/api/question'
 @Component({
   components: {
     filterInput, OrderCheckbox, OrderRadio, filterDate, OrderTool, OrderTable, AddOrder, InputSelect, OrderProduct,
     filterMinMax, loadOrderModal, PurchaseModel, MergeModel, SplitModel, CancelOrderModel, QuestModel, SetQuesModal, UpdateRmkModal, UpdateSalerModal,
-    TabModal, AddProductModal, FreightModal, LabelsModal, SendModeModal, batchbyOneModal, carpoolModal, DeliveryDetail, LogisticsInfo, ExpressDeliveryModal, ImportExcelModel
+    TabModal, AddProductModal, FreightModal, LabelsModal, SendModeModal, batchbyOneModal, carpoolModal, DeliveryDetail, LogisticsInfo, ExpressDeliveryModal, ImportExcelModel,
+    SyncOrder
   }
 })
 export default class Order extends Vue {
@@ -549,6 +553,15 @@ export default class Order extends Vue {
       (this.$refs.ImportExcelModel as any).setShow(true)
     }
   }
+
+  //同步订单
+  syncOrder() {
+    if (this.$refs.syncOrderRef) {
+      (this.$refs.syncOrderRef as any).setShow(true)
+    }
+  }
+
+
   //查看物流
   showLogistics(code: string) {
     if (this.$refs.logisticsInfo) {

+ 63 - 62
src/views/oms/pullRecord/index.vue

@@ -1,95 +1,96 @@
 <template>
   <div class="pull-record">
-    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList"
+      @resert="queryList" @search="queryList" />
   </div>
 </template>
 
 <script lang="ts">
 import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import {pullRecord} from '@/api/omsOrder'
-@Component({components:{}})
+import { pullRecord } from '@/api/omsOrder'
+@Component({ components: {} })
 export default class OrderPay extends Vue {
-  config:any={
-    attr:{
-      calculateH:true
+  config: any = {
+    attr: {
+      calculateH: true
     },
-    search:{
-      attr:{
-        size:'small'
+    search: {
+      attr: {
+        size: 'small'
       },
-      columns:[
+      columns: [
         [{
-          label:'订单来源',
+          label: '订单来源',
           span: 8,
-          prop:'sourceName',
-          component:'by-input'
+          prop: 'sourceName',
+          component: 'by-input'
         }]
       ]
     },
-    tool:{
-      tools:{
-        search:true,
-        refresh:true
+    tool: {
+      tools: {
+        search: true,
+        refresh: true
       }
     },
-    table:{
-      attr:{
-        size:'mini',
-        seq:true,
+    table: {
+      attr: {
+        size: 'mini',
+        seq: true,
         // align:'center',
       },
-      columns:[{
-        title:'订单来源',
-        field:'sourceName'
-      },{
-        title:'成功拉取数量',
-        field:'successQty',
-        width:130
-      },{
-        title:'已同步到OMS的订单数量',
-        field:'syncQty',
-        width:160
-      },{
-        title:'更新的OMS数量',
-        field:'updateQty',
-        width:130
-      },{
-        title:'新增的OMS订单数量',
-        field:'insertQty',
-        width:150
-      },{
-        title:'时间',
-        field:'respTime',
-        width:150
+      columns: [{
+        title: '订单来源',
+        field: 'sourceName'
+      }, {
+        title: '成功拉取数量',
+        field: 'successQty',
+        width: 130
+      }, {
+        title: '已同步到OMS的订单数量',
+        field: 'syncQty',
+        width: 160
+      }, {
+        title: '更新的OMS数量',
+        field: 'updateQty',
+        width: 130
+      }, {
+        title: '新增的OMS订单数量',
+        field: 'insertQty',
+        width: 150
+      }, {
+        title: '时间',
+        field: 'createTime',
+        width: 150
       }]
     }
   }
-  load=false
-  isSearch=false
+  load = false
+  isSearch = false
   timeNum = 0;
-  mounted(){
-    this.$nextTick(()=>{
+  mounted() {
+    this.$nextTick(() => {
       this.getList()
     })
   }
   //分页
-  pagination(){
-    if(this.isSearch){
+  pagination() {
+    if (this.isSearch) {
       this.queryList();
-    }else{
+    } else {
       this.getList()
     }
   }
   //列表请求(只有分页,不包含搜素条件)
-  getList(){
-    if(!this.$refs.view){
-      if(this.timeNum > 5){
+  getList() {
+    if (!this.$refs.view) {
+      if (this.timeNum > 5) {
         return
       }
-      setTimeout(()=>{
+      setTimeout(() => {
         this.getList()
-      },500) 
-      this.timeNum ++;
+      }, 500)
+      this.timeNum++;
       return
     }
     this.isSearch = false;
@@ -97,14 +98,14 @@ export default class OrderPay extends Vue {
     this.requestList(data);
   }
   //列表请求(包含分页和搜素条件)
-  queryList(){
+  queryList() {
     this.isSearch = true;
     let data = (this.$refs.view as any).getQuery();
     this.requestList(data);
   }
-  requestList(data:any){
+  requestList(data: any) {
     this.load = true;
-    pullRecord(data).then((res:any) => {
+    pullRecord(data).then((res: any) => {
       this.load = false;
       (this.$refs.view as any).setTableValue(res.data.records);
       let page = {
@@ -114,7 +115,7 @@ export default class OrderPay extends Vue {
       };
       (this.$refs.view as any).setPage(page)
 
-    }).catch(()=>{
+    }).catch(() => {
       this.load = false;
     })
   }
@@ -122,7 +123,7 @@ export default class OrderPay extends Vue {
 </script>
 
 <style lang="scss" scoped>
-.pull-record{
+.pull-record {
   height: 100%;
   width: 100%;
   overflow-y: hidden;

+ 1 - 1
src/views/orderConfig/orderTimeConfig/compoments/addConfig.vue

@@ -15,7 +15,7 @@
 import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 import { addOrderTimeConfig, updateOrderTimeConfig } from '@/api/orderConfig'
 @Component({ components: {} })
-export default class AddQuestModel extends Vue {
+export default class AddConfig extends Vue {
     timerId: number = 0;
     value = false;
     load = false;

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác