Ver Fonte

完善出库和退库

hfxc226 há 2 anos atrás
pai
commit
ec4cf0e922

+ 3 - 2
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -193,7 +193,7 @@ export default {
       form: this.$form.createForm(this),
       visible: false,
       maskClosable: false,
-      type: 1,
+      isOut: 1,
       storeId: null,
       // 下拉框map
       typeMap: {},
@@ -283,6 +283,7 @@ export default {
   methods: {
     base (record) {
       this.visible = true
+      this.isOut = record.isOut
       if (record.isOut === 1) {
         this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
       } else {
@@ -490,7 +491,7 @@ export default {
       }
       const data = [...this.data]
       const target = data.find(item => item.autoId === autoId)
-      if (value > target.storeNum) {
+      if (this.isOut === 1 && value > target.storeNum) {
         this.$message.error('领用数量不能大于库存数量')
         target[attr] = 1
         return

+ 2 - 2
src/views/store/outstoreform/modules/TicketForm.vue

@@ -31,7 +31,7 @@
         <table>
           <tr>
             <td colspan="3" style="text-align:left;">
-              {{ type? '领料':'退料' }}单位或个人:{{ model.createdUserName }}
+              {{ type? '领库':'退库' }}单位或个人:{{ model.createdUserName }}
             </td>
             <td colspan="3" style="text-align:left;">
               用途:{{ model.remark }}
@@ -71,7 +71,7 @@
         </table>
       </div>
       <div style="display:flex;justify-content:space-between ; margin: 10px auto;width: 1030px;">
-        <div >{{ type? '领料':'退料' }}人:{{ model.createdUserName }}</div>
+        <div >{{ type? '领库':'退库' }}人:{{ model.createdUserName }}</div>
         <div>部门主管:{{ model.applyUserName }}</div>
         <div style="width: 150px;">仓管:</div>
       </div>