Kaynağa Gözat

入库单优化

ymy 1 yıl önce
ebeveyn
işleme
de102dfbf1

+ 0 - 9
src/benyun/components/byInput/byInput.vue

@@ -34,7 +34,6 @@ config:{
     min:0 //最小值
     max:''  //最大值
     step:'' //间隔
-    isPositiveNumber:false/true 是否为正数
     prefixIcon:''  //头部图标
     suffixIcon:''  //尾部图标
   }
@@ -96,14 +95,6 @@ export default class ByInput extends VueViews {
   }
 
   onChange(){
-    if(this.value) {
-      if(this.attrs.isPositiveNumber) {
-        if(Number(this.value) && Number(this.value) < 0){
-          this.$message('请输入正数!')
-          this.value = 0
-        }
-      }
-    }
     this.$emit('onChange',this.value);
     
   }

+ 40 - 0
src/views/audit/warehousing/components/focus.vue

@@ -0,0 +1,40 @@
+<template>
+	<div>
+		<el-input placeholder="请选择机构名称" v-model="value" class="input-organizationName" size="small" clearable
+			:readonly="true">
+			<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
+		</el-input>
+		<!-- 选择机构名称 -->
+		<supplier-modal ref="supplierModal" @confirm="confirm" />
+	</div>
+</template>
+
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	@Component
+	export default class Focus extends Vue {
+		@Prop()
+		propValue : any;
+		value : any = '';
+		@Watch('propValue')
+		propValueChange(v : any) {
+			this.value = v;
+		}
+
+		handleSupplier() {
+			(this.$refs.supplierModal as any).setShow(true);
+		}
+		// 确定机构名称
+		confirm(e : any) {
+			this.value = e[0].name;
+			this.$emit('onChange', e[0].name)
+			
+		}
+	}
+</script>
+
+<style scoped>
+	.el-input__inner{
+		font-size: 12px !important;
+	}
+</style>

+ 1 - 2
src/views/audit/warehousing/index.vue

@@ -37,7 +37,7 @@
 	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
 	import api from "@/api/order";
 	import productModal from "../orderTask/components/productModal.vue";
-	import Focus from "../orderTask/components/focus.vue";
+	import Focus from "./components/focus.vue";
 	import towInOne from "./components/towInOne.vue";
 	import batchNumber from "./components/batchNumber.vue";
 	import BusinessType from "./components/businessType.vue";
@@ -791,7 +791,6 @@
 			// console.log('保存 ==>', this.tabType);
 			(this as any).$refs.bill.$refs.billForm.validate().then(() => {
 				let query = (this.$refs.bill as any).getBillFormValue(); // 获取单据数据
-				console.log('单据表单数据 ==> ', query);
 				// 供应商数据
 				if (!query.organizationName) query.organizationName = this.supplierInfo.name;
 				if (!query.organizationId) query.organizationId = this.supplierInfo.id;

+ 2 - 1
src/views/oms/order/components/purchaseModel.vue

@@ -226,9 +226,10 @@ export default class PurchaseModel extends Vue {
   hide(){}
 
   onChangeRow(row:any){
+    console.log(row,Number(row.qty),Number(row.residueQty))
     if(Number(row.qty) > Number(row.residueQty)){
       this.$message('数量不能大于可采购数量!');
-      row.qty = 1;
+      row.qty = '0';
       this.$forceUpdate()
     }
   }