Browse Source

Merge remote-tracking branch 'origin/xq'

# Conflicts:
#	jshERP-web/src/views/bill/modules/PurchaseInModal.vue
#	jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue
13660505945 3 weeks ago
parent
commit
e4dccfdbaf

+ 1 - 1
jshERP-web/src/components/jeecg/JEditableTable.vue

@@ -481,7 +481,7 @@
 
                     <!-- update-begin-author:jsh date:20210308 for:popupJsh -->
                     <template v-else-if="col.type === formTypes.popupJsh">
-                      <div :key="i">
+                      <div style="max-width: 190px" :key="i">
                         <a-tooltip
                           :id="id"
                           placement="top"

+ 6 - 6
jshERP-web/src/views/bill/dialog/BillDetail.vue

@@ -1640,7 +1640,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
@@ -1746,7 +1746,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
@@ -1786,7 +1786,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
@@ -1852,7 +1852,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
@@ -1887,7 +1887,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
@@ -1923,7 +1923,7 @@ export default {
         { title: '品牌', dataIndex: 'brand', width: 90 },
         { title: '制造商', dataIndex: 'mfrs', width: 90 },
         { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
-        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '库存', dataIndex: 'inventory', width: 90 },
         { title: '调入仓库', dataIndex: 'anotherDepotName' },
         { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '多属性', dataIndex: 'sku' },

+ 1 - 2
jshERP-web/src/views/bill/mixins/BillModalMixin.js

@@ -388,8 +388,6 @@ export const BillModalMixin = {
       this.initRetail(1)
     },
     batchSetDepotModalFormOk(depotId) {
-      console.log('22222222222222222211')
-
       this.getAllTable()
         .then((tables) => {
           return getListData(this.form, tables)
@@ -846,6 +844,7 @@ export const BillModalMixin = {
         unitId: mInfo.unitId,
         unitList: mInfo.unitList,
         depotId: mInfo.depotId,
+        inventory: mInfo.inventory,
       }
     },
     //使得型号、颜色、扩展信息、sku等为隐藏

+ 1 - 1
jshERP-web/src/views/bill/modules/AllocationOutModal.vue

@@ -233,7 +233,7 @@ export default {
           { title: '品牌', key: 'brand', width: '9%', type: FormTypes.normal },
           { title: '制造商', key: 'mfrs', width: '6%', type: FormTypes.normal },
           { title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.normal },
-          { title: '库存', key: 'stock', width: '5%', type: FormTypes.normal },
+          { title: '库存', key: 'inventory', width: '5%', type: FormTypes.normal },
           {
             title: '调入仓库',
             key: 'anotherDepotId',

+ 18 - 6
jshERP-web/src/views/bill/modules/OtherInModal.vue

@@ -294,7 +294,13 @@ export default {
           { title: '名称', key: 'name', width: '120px', type: FormTypes.normal },
           // { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
 
-          { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.datetime,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '生产日期',
+            key: 'productionDate',
+            width: '200px',
+            type: FormTypes.datetime,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
           { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
@@ -316,7 +322,13 @@ export default {
             // allowClear: false,
             // slotName: 'unit',
           },
-          { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.input,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '销售价',
+            key: 'wholesaleDecimal',
+            width: '120px',
+            type: FormTypes.input,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
           { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
           { title: '序列号', key: 'snList', width: '120px', type: FormTypes.popupJsh, kind: 'snAdd', multi: true },
@@ -395,10 +407,10 @@ export default {
         this.fileList = []
         this.imageList = []
       } else {
-        if (this.model.linkNumber) {
-          this.rowCanEdit = false
-          this.materialTable.columns[1].type = FormTypes.normal
-        }
+        // if (this.model.linkNumber) {
+        //   this.rowCanEdit = false
+        //   this.materialTable.columns[1].type = FormTypes.normal
+        // }
         this.model.operTime = this.model.operTimeStr
         this.fileList = this.model.fileName
         this.imageList = this.model.voucherPicture

+ 4 - 4
jshERP-web/src/views/bill/modules/OtherOutModal.vue

@@ -396,10 +396,10 @@ export default {
         this.fileList = []
         this.imageList = []
       } else {
-        if (this.model.linkNumber) {
-          this.rowCanEdit = false
-          this.materialTable.columns[1].type = FormTypes.normal
-        }
+        // if (this.model.linkNumber) {
+        //   this.rowCanEdit = false
+        //   this.materialTable.columns[1].type = FormTypes.normal
+        // }
         this.model.operTime = this.model.operTimeStr
         this.fileList = this.model.fileName
         this.imageList = this.model.voucherPicture

+ 18 - 6
jshERP-web/src/views/bill/modules/PurchaseInModal.vue

@@ -474,7 +474,13 @@ export default {
           { title: '名称', key: 'name', width: '120px', type: FormTypes.normal },
           { title: '规格', key: 'standard', width: '120px', type: FormTypes.normal },
 
-          { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.datetime,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '生产日期',
+            key: 'productionDate',
+            width: '200px',
+            type: FormTypes.datetime,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
           { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
@@ -496,7 +502,13 @@ export default {
             // allowClear: false,
             // slotName: 'unit',
           },
-          { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.input,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '销售价',
+            key: 'wholesaleDecima',
+            width: '120px',
+            type: FormTypes.input,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
           { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
           { title: '序列号', key: 'snList', width: '120px', type: FormTypes.popupJsh, kind: 'snAdd', multi: true },
@@ -598,10 +610,10 @@ export default {
           handleIntroJs(this.prefixNo, 1)
         })
       } else {
-        if (this.model.linkNumber) {
-          this.rowCanEdit = false
-          this.materialTable.columns[0].type = FormTypes.normal
-        }
+        // if (this.model.linkNumber) {
+        //   this.rowCanEdit = false
+        //   this.materialTable.columns[0].type = FormTypes.normal
+        // }
         this.model.operTime = this.model.operTimeStr
         if (this.model.deposit) {
           this.depositStatus = true

+ 20 - 8
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue

@@ -386,7 +386,7 @@ export default {
     },
   },
   data() {
-    const  that = this
+    const that = this
     return {
       title: '操作',
       width: '1600px',
@@ -431,10 +431,16 @@ export default {
           { title: '名称', key: 'name', width: '120px', type: FormTypes.normal },
           { title: '规格', key: 'standard', width: '120px', type: FormTypes.normal },
 
-          { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.datetime, validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '生产日期',
+            key: 'productionDate',
+            width: '200px',
+            type: FormTypes.datetime,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '120px', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select},
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -453,7 +459,13 @@ export default {
             // allowClear: false,
             // slotName: 'unit',
           },
-          { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.input, validateRules: [{ required: true, message: '${title}不能为空' }], },
+          {
+            title: '销售价',
+            key: 'wholesaleDecima',
+            width: '120px',
+            type: FormTypes.input,
+            validateRules: [{ required: true, message: '${title}不能为空' }],
+          },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
           { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
           { title: '多属性', key: 'sku', width: '120px', type: FormTypes.normal },
@@ -539,10 +551,10 @@ export default {
           handleIntroJs(this.prefixNo, 1)
         })
       } else {
-        if (this.model.linkNumber) {
-          this.rowCanEdit = false
-          this.materialTable.columns[1].type = FormTypes.normal
-        }
+        // if (this.model.linkNumber) {
+        //   this.rowCanEdit = false
+        //   this.materialTable.columns[1].type = FormTypes.normal
+        // }
         this.model.operTime = this.model.operTimeStr
         if (this.model.accountId == null && this.model.accountIdList) {
           this.model.accountId = 0

+ 5 - 5
jshERP-web/src/views/bill/modules/SaleOutModal.vue

@@ -502,7 +502,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal, disabled: true },
           // { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select},
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -623,10 +623,10 @@ export default {
           handleIntroJs(this.prefixNo, 1)
         })
       } else {
-        if (this.model.linkNumber) {
-          this.rowCanEdit = false
-          this.materialTable.columns[1].type = FormTypes.normal
-        }
+        // if (this.model.linkNumber) {
+        //   this.rowCanEdit = false
+        //   this.materialTable.columns[1].type = FormTypes.normal
+        // }
         this.model.operTime = this.model.operTimeStr
         if (this.model.deposit) {
           this.depositStatus = true

+ 1 - 2
jshERP-web/src/views/stock/CheckList.vue

@@ -47,8 +47,7 @@
           <span slot="action" slot-scope="text, record">
             <a @click="addTask('detail', record)">查看</a>
             <a-divider type="vertical" />
-            <a :disabled="record.taskStatus !== 1" @click="addTask('edit', record)">编辑</a>
-            <a-divider type="vertical" />
+            <a :disabled="record.taskStatus > 3" @click="addTask('edit', record)">编辑</a>
             <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
               <a :disabled="record.taskStatus !== 1 || record.taskStatus !== 4">删除</a>
             </a-popconfirm> -->

+ 19 - 17
jshERP-web/src/views/stock/components/checkModal.vue

@@ -113,7 +113,13 @@
           <a-input disabled v-model="editForm.batchNumber" placeholder="请输入"></a-input>
         </a-form-model-item>
         <a-form-model-item label="实际库存" :labelCol="{ span: 4 }" :wrapperCol="{ span: 14 }" prop="newInventory">
-          <a-input-number placeholder="请输入" v-model="editForm.newInventory" @change="handleChangeNewInventory" :min="0" style="width:100%" />
+          <a-input-number
+            placeholder="请输入"
+            v-model="editForm.newInventory"
+            @change="handleChangeNewInventory"
+            :min="0"
+            style="width: 100%"
+          />
         </a-form-model-item>
         <a-form-model-item label="实际仓位货架" :labelCol="{ span: 4 }" :wrapperCol="{ span: 14 }" prop="newPosition">
           <a-input v-model="editForm.newPosition" placeholder="请输入"></a-input>
@@ -123,14 +129,12 @@
             差异数量
             <span>
               <a-tooltip>
-                <template slot="title">
-                  盘盈是正数,盘亏是负数
-                </template>
+                <template slot="title"> 盘盈是正数,盘亏是负数 </template>
                 <a-icon type="question-circle" />
               </a-tooltip>
             </span>
           </template>
-          <span :class="editForm.differenceCount!==0?'red-num':''">{{editForm.differenceCount}}</span>
+          <span :class="editForm.differenceCount !== 0 ? 'red-num' : ''">{{ editForm.differenceCount }}</span>
         </a-form-model-item>
         <a-form-model-item label="差异原因" :labelCol="{ span: 4 }" :wrapperCol="{ span: 14 }" prop="differenceReason">
           <a-input v-model="editForm.differenceReason" placeholder="请输入"></a-input>
@@ -232,12 +236,12 @@ export default {
       },
       editForm: {},
       editVisible: false,
-      editFormRules:{
-        newInventory:[
+      editFormRules: {
+        newInventory: [
           { required: true, message: '请输入实际库存' },
-          { pattern: /^[0-9]*$/, message: '只能输入数字' }
-        ]
-      }
+          { pattern: /^[0-9]*$/, message: '只能输入数字' },
+        ],
+      },
     }
   },
   watch: {
@@ -266,10 +270,8 @@ export default {
   },
   computed: {
     isShowBtn() {
-      console.log('==================', this.form.taskStatus)
-
       if (this.openType === 'detail') return false
-      if (this.form.taskStatus !== 1) return false
+      if (this.form.taskStatus > 3) return false
 
       return true
     },
@@ -450,16 +452,16 @@ export default {
       }
     },
 
-    handleChangeNewInventory(val){
-      const inventory = this.editForm.inventory? Number(this.editForm.inventory):0
+    handleChangeNewInventory(val) {
+      const inventory = this.editForm.inventory ? Number(this.editForm.inventory) : 0
       this.editForm.differenceCount = val - inventory
-    }
+    },
   },
 }
 </script>
 
 <style>
-.red-num{
+.red-num {
   color: #f5222d;
 }
 </style>

+ 6 - 2
jshERP-web/src/views/stock/components/stockModal.vue

@@ -167,8 +167,12 @@ export default {
           }
           const url = this.openType === 'add' ? this.url.add : this.url.update
           postAction(url, params).then((res) => {
-            this.$message.success('操作成功')
-            this.handleCancel()
+            if (res.code === 200) {
+              this.$message.success('操作成功')
+              this.handleCancel()
+            } else {
+              this.$message.error(res.msg)
+            }
           })
         }
       })

+ 22 - 5
jshERP-web/src/views/system/modules/VendorModal.vue

@@ -14,7 +14,7 @@
       @cancel="handleCancel"
       cancelText="取消"
       okText="保存"
-      style="top: 10%; height: 80%"
+      style="top: 10%"
     >
       <template slot="footer">
         <a-button key="back" v-if="isReadOnly" @click="handleCancel"> 取消 </a-button>
@@ -87,7 +87,11 @@
             </a-col>
             <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
-                <a-input placeholder="请输入排序" v-decorator.trim="['sort']" />
+                <a-input
+                  placeholder="请输入排序"
+                  oninput="value=value.replace(/[^\d]/g, '')"
+                  v-decorator.trim="['sort']"
+                />
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
@@ -106,7 +110,11 @@
             </a-col>
             <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="账单周期">
-                <a-input placeholder="请输入账单周期" v-decorator.trim="['billingCycleDays']" />
+                <a-input
+                  placeholder="请输入账单周期"
+                  oninput="value=value.replace(/[^\d]/g, '')"
+                  v-decorator.trim="['billingCycleDays']"
+                />
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
@@ -116,7 +124,11 @@
             </a-col>
             <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="到货天数">
-                <a-input placeholder="请输入到货天数" v-decorator.trim="['deliveryDays']" />
+                <a-input
+                  placeholder="请输入到货天数"
+                  oninput="value=value.replace(/[^\d]/g, '')"
+                  v-decorator.trim="['deliveryDays']"
+                />
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
@@ -130,7 +142,12 @@
             </a-col>
             <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="税率(%)">
-                <a-input-number style="width: 100%" placeholder="请输入税率" v-decorator.trim="['taxRate']" />
+                <a-input-number
+                  style="width: 100%"
+                  oninput="value=value.replace(/[^\d.]/g, '')"
+                  placeholder="请输入税率"
+                  v-decorator.trim="['taxRate']"
+                />
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">