Przeglądaj źródła

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

hcf 2 lat temu
rodzic
commit
048f3c4050

+ 66 - 34
src/views/audit/outbound/index.vue

@@ -18,6 +18,7 @@
 	import stockLook from "./components/stockLook.vue";
 	import SettingConfig from "../saleOrder/components/settingConfig.vue";
 	import { add } from '@/benyun/utils/accuracy'
+	import {getSingleData} from "@/api/omsOrder";
 	@Component({ components: { SettingConfig } })
 	export default class Outbound extends Vue {
 		// 左边
@@ -1126,41 +1127,72 @@
 						};
 						billConfig.tool.tools = { return: true, save: true, smt: true };
 						// 查销售订单数据
-						api.single({ id: e.purchaseOrderId }, 'supplyPurchaseOrder').then((val : any) => {
-							if (val.code === 200) {
-								parentData.suborderList.map((v : any, i : any) => {
-									v.outNumber = val.data.suborderList[i].outNumber;
-								});
-								let data : any = parentData.suborderList;
-								let array : any = [];
-								data.map((v : any) => {
-									v.deliveryNumber = v.number - v.outNumber;
-									if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
-									v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
-									array.push({
-										storidId: v.storingLocationId,
-										skuid: v.materialSku,
-									})
-								});
-								//  查库存
-								api.getInventoryByStoridsAndSkuids(array).then((res : any) => {
-									if (res.code === 200) {
-										let newData : any = [];
-										res.data.map((v : any, i : any) => {
-											newData.push(Object.assign(data[i], v))
+						if(e.purchaseOrderId){
+							api.single({ id: e.purchaseOrderId }, 'supplyPurchaseOrder').then((val : any) => {
+								if (val.code === 200) {
+									parentData.suborderList.map((v : any, i : any) => {
+										v.outNumber = val.data.suborderList[i].outNumber;
+									});
+									let data : any = parentData.suborderList;
+									let array : any = [];
+									data.map((v : any) => {
+										v.deliveryNumber = v.number - v.outNumber;
+										if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
+										v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
+										array.push({
+											storidId: v.storingLocationId,
+											skuid: v.materialSku,
 										})
-										this.tableData = newData;
-										(this.$refs.bill as any).setBillConfig(billConfig);
-										(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
-										(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
-										this.isAdd = false;
-										this.dataId = '';
-										(this.$refs.bill as any).showTab = 'bill';
-										loading.close();
-									} else loading.close();
-								}).catch(() => loading.close());
-							} else loading.close();
-						}).catch(() => loading.close());
+									});
+									//  查库存
+									api.getInventoryByStoridsAndSkuids(array).then((res : any) => {
+										if (res.code === 200) {
+											let newData : any = [];
+											res.data.map((v : any, i : any) => {
+												newData.push(Object.assign(data[i], v))
+											})
+											this.tableData = newData;
+											(this.$refs.bill as any).setBillConfig(billConfig);
+											(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
+											(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
+											this.isAdd = false;
+											this.dataId = '';
+											(this.$refs.bill as any).showTab = 'bill';
+											loading.close();
+										} else loading.close();
+									}).catch(() => loading.close());
+								} else loading.close();
+							}).catch(() => loading.close());
+						}else{
+							let data : any = parentData.suborderList;
+							let array : any = [];
+							data.map((v : any) => {
+								v.deliveryNumber = v.number;
+								// if (v.deliveryNumber < v.number) v.number = v.deliveryNumber;
+								v.towInOne = v.storehouseName + ',' + v.storingLocationName; // 仓库仓位
+								array.push({
+									storidId: v.storingLocationId,
+									skuid: v.materialSku,
+								})
+							});
+							//  查库存
+							api.getInventoryByStoridsAndSkuids(array).then((res : any) => {
+								if (res.code === 200) {
+									let newData : any = [];
+									res.data.map((v : any, i : any) => {
+										newData.push(Object.assign(data[i], v))
+									})
+									this.tableData = newData;
+									(this.$refs.bill as any).setBillConfig(billConfig);
+									(this.$refs.bill as any).setBillFormValue(parentData);// 设置单据表单数据
+									(this.$refs.bill as any).setBillTableValue(newData, 0);// 设置第1张单据表格数据
+									this.isAdd = false;
+									this.dataId = '';
+									(this.$refs.bill as any).showTab = 'bill';
+									loading.close();
+								} else loading.close();
+							}).catch(() => loading.close());
+						}
 					} else {
 						loading.close();
 						this.setReadonly(parentData);

+ 15 - 6
src/views/audit/store/index.vue

@@ -1,8 +1,8 @@
 <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="search" @resert="onRefresh"
+				@detail="shortBarge" @onRefresh="onRefresh">
 			</module-view>
 		</div>
 	</div>
@@ -15,6 +15,7 @@
 		timeNum = 0;
 		skuInfo : any = ''
 		storeHouseInfo : any = ''
+		tableInfo : any = ''
 		timer : any = null
 		config : any = {
 			attr: {
@@ -98,7 +99,7 @@
 			api.getMaterialInventory().then((res : any) => {
 				if (res.code === 200) {
 					this.skuInfo = res.data;
-				}else loading.close();
+				} else loading.close();
 			}).then(() => {
 				api.pageList({
 					pageNum: 1,
@@ -106,7 +107,7 @@
 				}, 'maindataStorehouse').then((res : any) => {
 					if (res.code === 200) {
 						this.storeHouseInfo = res.data.records;
-					}else loading.close();
+					} else loading.close();
 					if (res.code === 200) {
 						let moduleConfig = (this as any).$lodash.cloneDeep(this.config.table);
 						this.storeHouseInfo = res.data.records;
@@ -149,8 +150,8 @@
 									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, //当前页
@@ -162,7 +163,15 @@
 					}).catch(() => 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.skuCode) {
+				let newData = this.tableInfo.filter((v : any) => v.skuCode == value.skuCode);
+				(this.$refs.moduleView as any).setTableValue(newData);
+			} else this.getDataList();
 		}
 		// 短驳
 		shortBarge(e : any) {

+ 1 - 1
src/views/oms/order/components/batchbyOneModal.vue

@@ -13,7 +13,7 @@
           :page-size="1"
           :current-page="currentOrder + 1"
           layout="prev, pager, next"
-          @current-change="currentChange"planType
+          @current-change="currentChange"
           :total="data.length">
         </el-pagination>
       </div>

+ 25 - 2
src/views/oms/order/components/deliveryGoodsInfo.vue

@@ -230,7 +230,10 @@ export default class DeliveryGoodsInfo extends Vue {
           required: true, message: '期望提货时间不能为空!', trigger: 'blur'
         }],
         tmsTransportMethod: [{
-          required: true, message: '运输方式不能为空!', trigger: 'blur'
+          required: true, message: '运输方式不能为空!', trigger: 'change'
+        }],
+        wmsSendType: [{
+          required: true, message: '出库方式不能为空!', trigger: 'change'
         }]
       }
     },
@@ -419,6 +422,26 @@ export default class DeliveryGoodsInfo extends Vue {
         }
       }],
       [{
+        span:12,
+        label:'出库方式',
+        prop:'wmsSendType',
+        component:'by-select',
+        compConfig:{
+          attr:{
+            clearable:true,
+            data: [{
+              label:'越库出库',
+              value:'YKCK'
+            },{
+              label:'B2B出库',
+              value:'B2BCK'
+            },{
+              label:'B2C出库',
+              value:'B2CCK'
+            }]
+          }
+        }
+      },{
         label:'备注',
         prop:'tmsRemark',
         component:'by-input',
@@ -588,7 +611,7 @@ export default class DeliveryGoodsInfo extends Vue {
     width: 100%;
     display: flex;
     justify-content: flex-end;
-  }
+  } 
 }
 </style>
 <style lang="scss">

+ 0 - 107
src/views/oms/order/components/deliveryModal2.vue

@@ -1,107 +0,0 @@
-<template>
-  <el-drawer
-    title="订单发货"
-    :visible.sync="drawer"
-    :direction="direction"
-    size="40%">
-    <div class="content">
-      <!-- <deliveryGoodsInfo />
-      <deliveryPrice /> -->
-    </div>
-    <div class="space"></div>
-    <div class="deli-footer">
-      <div class="d-left">
-        <div class="estimate-total">
-          预计总价<span class="total">¥16.00</span> <span class="detail" @click="jump">明细></span>
-        </div>
-        <div class="agreement">
-          <el-checkbox v-model="checked">已读并同意《XXX电子运单协议》</el-checkbox>
-        </div>
-      </div>
-      <div class="send-btn" @click="btn">确认发货</div>
-    </div>
-    <deliveryDetail ref="deliveryDetail" />
-  </el-drawer>
-</template>
-
-<script lang="ts">
-import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import DeliveryGoodsInfo from "./deliveryGoodsInfo.vue";
-import DeliveryPrice from "./deliveryPrice.vue";
-import deliveryDetail from './deliveryDetail.vue'
-@Component({components:{DeliveryGoodsInfo,DeliveryPrice,deliveryDetail}})
-export default class DeliveryModal extends Vue {
-  drawer=false;
-  direction='rtl'
-  checked=false;
-  value:any={}
-  setShow(v:boolean){
-    this.drawer=v;
-  }
-  btn(){
-    this.drawer = false;
-    this.$emit('sendHandle')
-  }
-  jump(){
-    if(this.$refs.deliveryDetail){
-      (this.$refs.deliveryDetail as any).setShow(true);
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.content{
-  width: 100%;
-  box-sizing: border-box;
-  padding: 0 16px;
-  background-color: #FFF;
-  
-}
-.deli-footer{
-  height: 60px;
-  width: 100%;
-  padding: 0 16px;
-  box-sizing: border-box;
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  position: absolute;
-  background-color: #FFF;
-  left: 0;
-  bottom: 0;
-  z-index: 10;
-  .d-left{
-    width: 70%;
-    .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;
-    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;
-  }
-}
-.space{
-  height: 60px;
-  width: 100%;
-  margin-top: 16px;
-}
-</style>