15 Commity b9ffd05859 ... e4cce594e5

Autor SHA1 Wiadomość Data
  ms-blue e4cce594e5 配置文件更新 1 miesiąc temu
  13660505945 54c28d0b01 Merge remote-tracking branch 'origin/master_huangjunjie' 1 miesiąc temu
  13660505945 50db7eebf0 Merge remote-tracking branch 'origin/master_liaozeyong' 1 miesiąc temu
  廖泽勇 4b59e5796e 排序调整 1 miesiąc temu
  廖泽勇 04534bcec4 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_liaozeyong 1 miesiąc temu
  廖泽勇 96ab2c6da9 pda图片处理 1 miesiąc temu
  huang 7a2d28eaa8 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie 1 miesiąc temu
  huang 6b10fac5b9 pda存货查询,pc端设置菜单bug修改 1 miesiąc temu
  13660505945 ea49fdebac Merge remote-tracking branch 'origin/xq' 1 miesiąc temu
  15102826049 703603779d bug提交 1 miesiąc temu
  13660505945 1c0ef9dfb9 Merge remote-tracking branch 'origin/master_liaozeyong' 1 miesiąc temu
  13660505945 8f002c84e2 Merge remote-tracking branch 'origin/master_liushuang' 1 miesiąc temu
  13660505945 7d0519fdae Merge remote-tracking branch 'origin/master_liushuang' 1 miesiąc temu
  廖泽勇 d514a35b1a pda 盘点筛选,盘点详情修改 1 miesiąc temu
  huang 2a0707c0e5 Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie 1 miesiąc temu
37 zmienionych plików z 272 dodań i 72 usunięć
  1. 4 0
      jshERP-web/src/api/api.js
  2. 6 0
      jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue
  3. 5 0
      jshERP-web/src/views/bill/dialog/BillDetail.vue
  4. 9 0
      jshERP-web/src/views/bill/mixins/BillModalMixin.js
  5. 17 1
      jshERP-web/src/views/bill/modules/AllocationOutModal.vue
  6. 17 1
      jshERP-web/src/views/bill/modules/OtherInModal.vue
  7. 18 2
      jshERP-web/src/views/bill/modules/OtherOutModal.vue
  8. 17 1
      jshERP-web/src/views/bill/modules/PurchaseInModal.vue
  9. 3 8
      jshERP-web/src/views/bill/modules/SaleOrderModal.vue
  10. 20 4
      jshERP-web/src/views/bill/modules/SaleOutModal.vue
  11. 2 2
      jshERP-web/src/views/stock/CheckList.vue
  12. 15 1
      jshERP-web/src/views/stock/TaskList.vue
  13. 3 3
      jshERP-web/src/views/stock/components/FilterForm.vue
  14. 9 9
      jshERP-web/src/views/stock/components/checkModal.vue
  15. 8 1
      jshERP-web/src/views/stock/components/editForm.vue
  16. 2 2
      jshERP-web/src/views/stock/components/stockModal.vue
  17. 2 2
      jshERP-web/src/views/stock/utils/table.js
  18. 5 4
      jshERP-web/src/views/system/modules/RoleFunctionModal.vue
  19. 2 5
      src/main/java/com/jsh/erp/controller/pda/PdaController.java
  20. 7 0
      src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java
  21. 5 0
      src/main/java/com/jsh/erp/datasource/pda/dto/PDAInventoryDTO.java
  22. 3 0
      src/main/java/com/jsh/erp/datasource/pda/dto/PDATaskStocktakingItemDTO.java
  23. 4 0
      src/main/java/com/jsh/erp/datasource/pda/vo/PDADepotHeadVO.java
  24. 3 0
      src/main/java/com/jsh/erp/datasource/pda/vo/PDATaskStocktakingItemVO.java
  25. 3 0
      src/main/java/com/jsh/erp/datasource/vo/TaskStocktakingVO.java
  26. 1 1
      src/main/java/com/jsh/erp/filter/LogCostFilter.java
  27. 7 0
      src/main/java/com/jsh/erp/service/DepotHeadService.java
  28. 1 1
      src/main/java/com/jsh/erp/service/MaterialService.java
  29. 1 0
      src/main/java/com/jsh/erp/service/UserBusinessService.java
  30. 5 0
      src/main/java/com/jsh/erp/service/impl/DepotHeadServiceImpl.java
  31. 15 4
      src/main/java/com/jsh/erp/service/impl/MaterialServiceImpl.java
  32. 13 7
      src/main/java/com/jsh/erp/service/impl/TaskStocktakingServiceImpl.java
  33. 1 6
      src/main/resources/application-dev.yml
  34. 20 0
      src/main/resources/mapper_xml/DepotHeadMapper.xml
  35. 1 1
      src/main/resources/mapper_xml/MaterialExtendMapper.xml
  36. 9 5
      src/main/resources/mapper_xml/MaterialMapperEx.xml
  37. 9 1
      src/main/resources/mapper_xml/TaskStocktakingItemMapper.xml

+ 4 - 0
jshERP-web/src/api/api.js

@@ -120,6 +120,9 @@ const findStockByDepotAndBarCode = (params) => getAction('/depotItem/findStockBy
 const getBatchNumberList = (params) => getAction('/depotItem/getBatchNumberList', params)
 const findFinancialDetailByNumber = (params) => getAction('/accountHead/getDetailByNumber', params)
 
+//出入库人
+const creatorSpinnerList = (params) => getAction('/stocktaking/creatorSpinnerList', params)
+
 export {
   getBuyAndSaleStatistics,
   buyOrSalePrice,
@@ -215,4 +218,5 @@ export {
   findFinancialDetailByNumber,
   getMaterialById,
   getUnitInfo,
+  creatorSpinnerList,
 }

+ 6 - 0
jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue

@@ -93,6 +93,11 @@
                     </a-select>
                   </a-form-item>
                 </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="仓库货架" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-input placeholder="请输入制造商" v-model="queryParam.position"></a-input>
+                  </a-form-item>
+                </a-col>
                 <!-- <a-col :md="6" :sm="24">
                   <a-form-item label="批号" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
                     <a-select placeholder="有无批号" v-model="queryParam.enableBatchNumber">
@@ -178,6 +183,7 @@ export default {
         mfrs: '',
         enableSerialNumber: undefined,
         enableBatchNumber: undefined,
+        position: '',
       },
       labelCol: {
         xs: { span: 24 },

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

@@ -916,6 +916,11 @@
               </a-form-item>
             </a-col>
             <a-col :span="6">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
+                <vue-qr :text="model.number" :size="200" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="6">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
                 {{ model.debt }}
               </a-form-item>

+ 9 - 0
jshERP-web/src/views/bill/mixins/BillModalMixin.js

@@ -11,6 +11,7 @@ import {
   getPersonByNumType,
   getPlatformConfigByKey,
   getUnitInfo,
+  creatorSpinnerList,
 } from '@/api/api'
 import { getAction } from '@/api/manage'
 import { getCheckFlag, getMpListShort, getNowFormatDateTime } from '@/utils/util'
@@ -71,6 +72,7 @@ export const BillModalMixin = {
         labelCol6: { span: 12 },
         wrapperCol6: { span: 12 },
       },
+      currentUserList: [],
     }
   },
   created() {
@@ -80,6 +82,7 @@ export const BillModalMixin = {
   },
   mounted() {
     document.getElementById(this.prefixNo).addEventListener('keydown', this.handleOkKey)
+    this.getCreatorSpinnerList()
   },
   beforeDestroy() {
     document.getElementById(this.prefixNo).removeEventListener('keydown', this.handleOkKey)
@@ -1220,5 +1223,11 @@ export const BillModalMixin = {
         }
       }
     },
+    //获取出入库人
+    getCreatorSpinnerList() {
+      creatorSpinnerList().then((res) => {
+        this.currentUserList = res.data
+      })
+    },
   },
 }

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

@@ -104,6 +104,21 @@
               </a-select-option>
             </a-select>
           </template>
+          <template #warehousingUser="{ handleChange, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['warehousingUser']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              :options="currentUserList"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -264,7 +279,8 @@ export default {
             title: '出库人',
             key: 'warehousingUser',
             width: '9%',
-            type: FormTypes.input,
+            type: FormTypes.slot,
+            slotName: 'warehousingUser',
             validateRules: [{ required: true, message: '出库人不能为空' }],
           },
           { title: '出库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },

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

@@ -149,6 +149,21 @@
               </a-select-option>
             </a-select>
           </template>
+          <template #warehousingUser="{ handleChange, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['warehousingUser']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              :options="currentUserList"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -332,7 +347,8 @@ export default {
             title: '入库人',
             key: 'warehousingUser',
             width: '9%',
-            type: FormTypes.input,
+            type: FormTypes.slot,
+            slotName: 'warehousingUser',
             validateRules: [{ required: true, message: '入库人不能为空' }],
           },
           { title: '入库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },

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

@@ -150,6 +150,21 @@
               </a-select-option>
             </a-select>
           </template>
+          <template #warehousingUser="{ handleChange, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['warehousingUser']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              :options="currentUserList"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -282,7 +297,7 @@ export default {
           { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal },
           { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           { title: '商品条码', key: 'barCode', width: '6%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotName', width: '6%', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '6%', type: FormTypes.select, disabled: true },
           { title: '仓库货架', key: 'position', width: '6%', type: FormTypes.normal },
           { title: '包装规格', key: 'unitName', width: '6%', type: FormTypes.normal },
 
@@ -332,7 +347,8 @@ export default {
             title: '出库人',
             key: 'warehousingUser',
             width: '9%',
-            type: FormTypes.input,
+            type: FormTypes.slot,
+            slotName: 'warehousingUser',
             validateRules: [{ required: true, message: '出库人不能为空' }],
           },
           { title: '出库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },

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

@@ -174,6 +174,21 @@
               </a-select-option>
             </a-select>
           </template>
+          <template #warehousingUser="{ handleChange, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['warehousingUser']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              :options="currentUserList"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -523,7 +538,8 @@ export default {
             title: '入库人',
             key: 'warehousingUser',
             width: '9%',
-            type: FormTypes.input,
+            type: FormTypes.slot,
+            slotName: 'warehousingUser',
             validateRules: [{ required: true, message: '入库人不能为空' }],
           },
           { title: '入库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },

+ 3 - 8
jshERP-web/src/views/bill/modules/SaleOrderModal.vue

@@ -284,22 +284,17 @@
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货人" data-step="10">
-              <a-input placeholder="请输入收货人" v-decorator.trim="['receiverName']" :readOnly="true" />
+              <a-input placeholder="请输入收货人" v-decorator.trim="['receiverName']" />
             </a-form-item>
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货人电话" data-step="10">
-              <a-input placeholder="请输入收货人电话" v-decorator.trim="['receiverPhone']" :readOnly="true" />
+              <a-input placeholder="请输入收货人电话" v-decorator.trim="['receiverPhone']" />
             </a-form-item>
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货地址" data-step="8">
-              <a-input
-                style="width: 80%"
-                placeholder="请输入收货地址"
-                v-decorator.trim="['receiverAddress']"
-                :readOnly="true"
-              />
+              <a-input style="width: 80%" placeholder="请输入收货地址" v-decorator.trim="['receiverAddress']" />
             </a-form-item>
           </a-col>
         </a-row>

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

@@ -176,6 +176,21 @@
               </a-select-option>
             </a-select>
           </template>
+          <template #warehousingUser="{ handleChange, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['warehousingUser']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              :options="currentUserList"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -341,17 +356,17 @@
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货人" data-step="10">
-              <a-input placeholder="请输入收货人" v-decorator="['receiverName']" :readOnly="true" />
+              <a-input placeholder="请输入收货人" v-decorator="['receiverName']" />
             </a-form-item>
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货人电话" data-step="10">
-              <a-input placeholder="请输入收货人电话" v-decorator="['receiverPhone']" :readOnly="true" />
+              <a-input placeholder="请输入收货人电话" v-decorator="['receiverPhone']" />
             </a-form-item>
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收货地址" data-step="10">
-              <a-input placeholder="请输入收货地址" v-decorator="['receiverAddress']" :readOnly="true" />
+              <a-input placeholder="请输入收货地址" v-decorator="['receiverAddress']" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -546,7 +561,8 @@ export default {
             title: '出库人',
             key: 'warehousingUser',
             width: '9%',
-            type: FormTypes.input,
+            type: FormTypes.slot,
+            slotName: 'warehousingUser',
             validateRules: [{ required: true, message: '出库人不能为空' }],
           },
           { title: '出库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },

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

@@ -49,9 +49,9 @@
             <a-divider type="vertical" />
             <a :disabled="record.taskStatus !== 1" @click="addTask('edit', record)">编辑</a>
             <a-divider type="vertical" />
-            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
               <a :disabled="record.taskStatus !== 1 || record.taskStatus !== 4">删除</a>
-            </a-popconfirm>
+            </a-popconfirm> -->
           </span>
         </a-table>
       </a-card>

+ 15 - 1
jshERP-web/src/views/stock/TaskList.vue

@@ -43,7 +43,6 @@
           :rowSelection="{
             selectedRowKeys: selectedRowKeys,
             onChange: onSelectChange,
-            getCheckboxProps: getTaskkboxProps,
           }"
           @change="handleTableChange"
         >
@@ -146,6 +145,18 @@ export default {
       }
     },
   },
+  computed: {
+    isDel() {
+      return this.selectionRows.filter((item) => item.taskStatus !== 1 && item.taskStatus !== 4).length > 0
+        ? true
+        : false
+    },
+    isStock() {
+      return this.selectionRows.filter((item) => item.taskStatus !== 1 && item.taskStatus !== 2).length > 0
+        ? true
+        : false
+    },
+  },
 
   created() {
     this.getList()
@@ -199,6 +210,8 @@ export default {
     },
 
     handleDelete(id) {
+      if (this.isDel) return this.$message.error('只能删除未开始或已取消的盘点任务,请重新选择!')
+
       const ids = id || this.selectedRowKeys
       const url = this.url.delete + ids
       getAction(url)
@@ -211,6 +224,7 @@ export default {
         })
     },
     cancelTask() {
+      if (this.isStock) return this.$message.error('只能取消未开始或进行中的盘点任务,请重新选择!')
       const ids = this.selectedRowKeys
       const url = this.url.cancel + ids
       getAction(url)

+ 3 - 3
jshERP-web/src/views/stock/components/FilterForm.vue

@@ -3,7 +3,7 @@
     <!-- 搜索区域 -->
     <a-form layout="inline" :form="queryParam" ref="form" @keyup.enter.native="searchQuery">
       <a-row :gutter="24">
-        <a-col :md="5" :sm="24">
+        <a-col :md="4" :sm="24">
           <a-form-item label="盘点状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-select placeholder="请选择供应商" showSearch :options="taskStatusList" v-model="queryParam.taskStatus">
             </a-select>
@@ -11,7 +11,7 @@
         </a-col>
         <a-col :md="5" :sm="24">
           <a-form-item label="盘点单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-input placeholder="请输入条码、名称、助记码、规格、型号等信息" v-model="queryParam.number"></a-input>
+            <a-input placeholder="请输入条码、名称" v-model="queryParam.number"></a-input>
           </a-form-item>
         </a-col>
         <a-col :md="5" :sm="24">
@@ -20,7 +20,7 @@
             </a-select>
           </a-form-item>
         </a-col>
-        <a-col :md="5" :sm="24">
+        <a-col :md="4" :sm="24">
           <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-select placeholder="请选择创建人" showSearch :options="spinnerList" v-model="queryParam.createBy">
             </a-select>

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

@@ -18,17 +18,17 @@
         <a-divider />
         <div>
           <div>
-            <a-form :form="queryParams" ref="form">
+            <a-form :form="queryParam" ref="form">
               <a-row class="form-row" :gutter="24">
                 <a-col :lg="6" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品类别">
-                    <!-- <a-input disabled placeholder="请输入" v-model="queryParams.categoryId" /> -->
+                    <!-- <a-input disabled placeholder="请输入" v-model="queryParam.categoryId" /> -->
                     <a-tree-select
                       style="width: 100%"
                       :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
                       allow-clear
                       :treeData="categoryTree"
-                      v-model="queryParams.categoryId"
+                      v-model="queryParam.categoryId"
                       placeholder="请选择商品类别"
                     >
                     </a-tree-select>
@@ -36,17 +36,17 @@
                 </a-col>
                 <a-col :lg="6" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品名称">
-                    <a-input placeholder="请输入" v-model="queryParams.name" />
+                    <a-input placeholder="请输入" v-model="queryParam.name" />
                   </a-form-item>
                 </a-col>
                 <a-col :lg="6" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="批次号">
-                    <a-input placeholder="请输入" v-model="queryParams.batchNumber" />
+                    <a-input placeholder="请输入" v-model="queryParam.batchNumber" />
                   </a-form-item>
                 </a-col>
                 <a-col :lg="6" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓位货架">
-                    <a-input placeholder="请输入" v-model="queryParams.position" />
+                    <a-input placeholder="请输入" v-model="queryParam.position" />
                   </a-form-item>
                 </a-col>
                 <a-col :lg="6" :md="12" :sm="24" class="form-col">
@@ -200,7 +200,7 @@ export default {
       form: {},
       isShow: false,
       stockType: 'check',
-      queryParams: { categoryId: '', materialName: '', batchNumber: '', position: '', isDifference: null },
+      queryParam: { categoryId: '', materialName: '', batchNumber: '', position: '', isDifference: null },
       isDifferenceData: [
         {
           label: '是',
@@ -244,7 +244,7 @@ export default {
     editVisible(val) {
       if (!val) {
         this.editForm = {}
-        this.form.resetFields()
+        // this.form.resetFields()
       }
     },
   },
@@ -361,7 +361,7 @@ export default {
       const url2 = '/stocktaking/detailByItemList'
       const form = this.$refs['editForm'].form
 
-      const params = { ...this.queryParams, taskStocktakingId: id }
+      const params = { ...this.queryParam, taskStocktakingId: id || this.taskId }
       const url = url2 + '?pageNum=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
       postAction(url, params).then((res) => {
         this.dataSource = res.data

+ 8 - 1
jshERP-web/src/views/stock/components/editForm.vue

@@ -200,4 +200,11 @@ export default {
 }
 </script>
 
-<style></style>
+<style lang="less">
+.ant-input-disabled {
+  background-color: rgb(255, 255, 255, 0.2) !important;
+}
+.ant-select-disabled {
+  background-color: rgba(255, 255, 255, 0.2) !important;
+}
+</style>

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

@@ -32,8 +32,8 @@
             :pagination="false"
             @change="handleTableChange"
           >
-            <span v-if="form.taskType === 2" slot="action" slot-scope="text, record">
-              <a-divider type="vertical" />
+            <span v-if="isShowBtn" slot="action" slot-scope="text, record">
+              <!-- <a-divider type="vertical" /> -->
               <a-popconfirm @confirm="handleDelete(record)" title="确定删除吗?">
                 <a>删除</a>
               </a-popconfirm>

+ 2 - 2
jshERP-web/src/views/stock/utils/table.js

@@ -83,10 +83,10 @@ const table = {
   ],
   checkGoodsColumns: [
     { dataIndex: 'categoryName', title: '商品类别' },
-    { dataIndex: 'name', title: '商品名称' },
+    { dataIndex: 'materialName', title: '商品名称' },
     { dataIndex: 'systemSku', title: '系统SKU' },
     { dataIndex: 'batchNumber', title: '批次号' },
-    { dataIndex: 'unit', title: '单位' },
+    { dataIndex: 'commodityUnit', title: '单位' },
     { dataIndex: 'productionDate', title: '生产日期' },
     { dataIndex: 'supplierName', title: '供应商' },
     { dataIndex: 'barCode', title: '商品条码' },

+ 5 - 4
jshERP-web/src/views/system/modules/RoleFunctionModal.vue

@@ -109,7 +109,8 @@ export default {
           let formData = Object.assign(this.model, values)
           formData.type = 'RoleFunctions'
           formData.keyId = this.roleId
-          formData.value = this.checkedKeys
+          formData.value = this.checkedKeys.map((item) => Number(item))
+
           let obj
           checkUserBusiness({ type: 'RoleFunctions', keyId: this.roleId }).then((res) => {
             if (res.data && res.data.id) {
@@ -170,10 +171,10 @@ export default {
     },
     setThisExpandedKeys(node) {
       if (node.checked == true) {
-        this.checkedKeys.push(node.key)
+        this.checkedKeys.push(Number(node.key))
       }
       if (node.children && node.children.length > 0) {
-        this.iExpandedKeys.push(node.key)
+        this.iExpandedKeys.push(Number(node.key))
         for (let a = 0; a < node.children.length; a++) {
           this.setThisExpandedKeys(node.children[a])
         }
@@ -181,7 +182,7 @@ export default {
     },
     getAllKeys(node) {
       // console.log('node',node);
-      this.allTreeKeys.push(node.key)
+      this.allTreeKeys.push(Number(node.key))
       if (node.children && node.children.length > 0) {
         for (let a = 0; a < node.children.length; a++) {
           this.getAllKeys(node.children[a])

+ 2 - 5
src/main/java/com/jsh/erp/controller/pda/PdaController.java

@@ -9,7 +9,6 @@ import com.jsh.erp.base.AjaxResult;
 import com.jsh.erp.base.BaseController;
 import com.jsh.erp.base.TableDataInfo;
 import com.jsh.erp.datasource.entities.DepotHead;
-import com.jsh.erp.datasource.entities.MaterialVo4Unit;
 import com.jsh.erp.datasource.entities.Supplier;
 import com.jsh.erp.datasource.entities.*;
 import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
@@ -25,12 +24,9 @@ import com.jsh.erp.datasource.vo.TaskStocktakingVO;
 import com.jsh.erp.datasource.vo.TreeNode;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.*;
-import com.jsh.erp.utils.FileUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -105,6 +101,7 @@ public class PdaController extends BaseController {
     public AjaxResult orderInfo(@PathVariable("id") Long id){
         DepotHead depotHead = depotHeadService.getOne(new LambdaQueryWrapperX<DepotHead>().eq(DepotHead::getId, id));
         depotHead.setSupplierName(supplierService.getOne(new LambdaQueryWrapperX<Supplier>().eq(Supplier::getId, depotHead.getOrganId())).getSupplier());
+//        depotHeadService.pdaDetail(id);
         return AjaxResult.success(depotHead);
     }
 
@@ -279,7 +276,7 @@ public class PdaController extends BaseController {
 
     @PostMapping("/inventoryInquiry")
     @ApiOperation("存货查询-商品存货查询")
-    public TableDataInfo inventoryInquiry(@RequestBody PDAInventoryDTO pdaInventoryDTO){
+    public TableDataInfo inventoryInquiry(@RequestBody PDAInventoryDTO pdaInventoryDTO) throws Exception {
         startPage();
         List<PDADepotItemVO> list = materialService.inventoryInquiry(pdaInventoryDTO);
         return getDataTable(list);

+ 7 - 0
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java

@@ -17,6 +17,13 @@ public interface DepotHeadMapper extends BaseMapperX<DepotHead> {
      */
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
 
+    /**
+     * PDA查询订单详情
+     * @param id 订单id
+     * @return
+     */
+    PDADepotHeadVO pdaDetail(@Param("id")Long id);
+
     long countByExample(DepotHeadExample example);
 
     int deleteByExample(DepotHeadExample example);

+ 5 - 0
src/main/java/com/jsh/erp/datasource/pda/dto/PDAInventoryDTO.java

@@ -4,6 +4,8 @@ package com.jsh.erp.datasource.pda.dto;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 存货查询接口
  */
@@ -22,4 +24,7 @@ public class PDAInventoryDTO {
     @ApiModelProperty("关键字")
     private String keyword;
 
+    @ApiModelProperty("商品种类ID数组")
+    private List<Long> categoryIds;
+
 }

+ 3 - 0
src/main/java/com/jsh/erp/datasource/pda/dto/PDATaskStocktakingItemDTO.java

@@ -22,4 +22,7 @@ public class PDATaskStocktakingItemDTO {
 
     @ApiModelProperty("商品盘点类型:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     private List<String> statusList;
+
+    @ApiModelProperty("任务编号")
+    private String number;
 }

+ 4 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDADepotHeadVO.java

@@ -23,6 +23,10 @@ public class PDADepotHeadVO {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
+    @ApiModelProperty("单据时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date operTime;
+
     @ApiModelProperty("商品总数量")
     private int goodsQuantity;
 

+ 3 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDATaskStocktakingItemVO.java

@@ -51,4 +51,7 @@ public class PDATaskStocktakingItemVO {
     @ApiModelProperty("盘点状态:1.未盘,2.盘盈,3.盘亏 4.无差异 其余为全部")
     private Integer status;
 
+    @ApiModelProperty("图片地址")
+    private String imgName;
+
 }

+ 3 - 0
src/main/java/com/jsh/erp/datasource/vo/TaskStocktakingVO.java

@@ -33,4 +33,7 @@ public class TaskStocktakingVO extends TaskStocktaking {
     @ApiModelProperty("准确率")
     private double accuracyRate;
 
+    @ApiModelProperty("盘点人操作人数")
+    private Long operCount;
+
 }

+ 1 - 1
src/main/java/com/jsh/erp/filter/LogCostFilter.java

@@ -55,7 +55,7 @@ public class LogCostFilter implements Filter {
             return;
         }
         if (requestUrl != null && (requestUrl.contains("/doc.html") ||
-            requestUrl.contains("/user/pdaLogin") || requestUrl.contains("/pda/downloadApk") || requestUrl.contains("/pda/selectVersion") ||
+            requestUrl.contains("/user/pdaLogin") ||
             requestUrl.contains("/user/login") || requestUrl.contains("/user/register") || requestUrl.contains("/user/randomImage")
             ||requestUrl.contains("/open-api"))) {
             chain.doFilter(request, response);

+ 7 - 0
src/main/java/com/jsh/erp/service/DepotHeadService.java

@@ -28,6 +28,13 @@ public interface DepotHeadService extends IService<DepotHead> {
      */
     List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
 
+    /**
+     * PDA查询订单详情
+     * @param id
+     * @return
+     */
+    PDADepotHeadVO pdaDetail(Long id);
+
     DepotHead getDepotHead(long id)throws Exception;
 
     List<DepotHead> getDepotHead()throws Exception;

+ 1 - 1
src/main/java/com/jsh/erp/service/MaterialService.java

@@ -193,7 +193,7 @@ public interface MaterialService extends IService<Material> {
      * pdaInventoryDTO
      * @return
      */
-    List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO);
+    List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) throws Exception;
 
     /**
      * 查询库位树

+ 1 - 0
src/main/java/com/jsh/erp/service/UserBusinessService.java

@@ -80,6 +80,7 @@ public class UserBusinessService {
             String value = userBusiness.getValue();
             String newValue = value.replaceAll(",","\\]\\[");
             newValue = newValue.replaceAll("\\[0\\]","").replaceAll("\\[\\]","");
+            newValue = newValue.replace("\"", "");
             userBusiness.setValue(newValue);
             result=userBusinessMapper.updateByPrimaryKeySelective(userBusiness);
             logService.insertLog("关联关系", BusinessConstants.LOG_OPERATION_TYPE_EDIT, request);

+ 5 - 0
src/main/java/com/jsh/erp/service/impl/DepotHeadServiceImpl.java

@@ -111,6 +111,11 @@ public class DepotHeadServiceImpl extends ServiceImpl<DepotHeadMapper, DepotHead
     }
 
     @Override
+    public PDADepotHeadVO pdaDetail(Long id) {
+        return depotHeadMapper.pdaDetail(id);
+    }
+
+    @Override
     public DepotHead getDepotHead(long id)throws Exception {
         DepotHead result=null;
         try{

+ 15 - 4
src/main/java/com/jsh/erp/service/impl/MaterialServiceImpl.java

@@ -1638,7 +1638,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
 
     @Override
     public List<MaterialVo4Unit> getMaterialBySystemSku(List<String> systemSkuList) {
-        if (CollectionUtil.isEmpty(systemSkuList)) {
+        if (CollectionUtil.isEmpty(systemSkuList)){
             return null;
         }
         String[] systemSkuArray = systemSkuList.toArray(new String[systemSkuList.size()]);
@@ -2003,7 +2003,9 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
     }
 
     @Override
-    public List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) {
+    public List<PDADepotItemVO> inventoryInquiry(PDAInventoryDTO pdaInventoryDTO) throws Exception {
+        //查询类型id的子类型
+        pdaInventoryDTO.setCategoryIds(selectCategoryIds(pdaInventoryDTO.getCategoryId()));
         return materialMapperEx.inventoryInquiry(pdaInventoryDTO);
     }
 
@@ -2018,9 +2020,9 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
             String [] str = s.split("-");
             if (map.get(str[0]) == null){
                 List<String> list = new ArrayList<>();
-                list.add(str[1]);
                 map.put(str[0],list);
-            }else {
+            }
+            if (str.length > 2){
                 map.get(str[0]).add(str[1]);
             }
         }
@@ -2136,4 +2138,13 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
         return materials;
     }
 
+    public List<Long> selectCategoryIds(Long id) throws Exception {
+        List<Long> longs = new ArrayList<>();
+        longs.add(id);
+        List<MaterialCategory> list = materialCategoryService.list(new LambdaQueryWrapperX<MaterialCategory>().eq(MaterialCategory::getParentId,id).eq(MaterialCategory::getDeleteFlag,"0"));
+        for (MaterialCategory materialCategory : list) {
+            longs.addAll(selectCategoryIds(materialCategory.getId()));
+        }
+        return longs;
+    }
 }

+ 13 - 7
src/main/java/com/jsh/erp/service/impl/TaskStocktakingServiceImpl.java

@@ -1,9 +1,6 @@
 package com.jsh.erp.service.impl;
 
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jsh.erp.datasource.dto.TaskStocktakingDTO;
 import com.jsh.erp.datasource.dto.TaskStocktakingItemQueryDTO;
@@ -251,6 +248,8 @@ public class TaskStocktakingServiceImpl extends ServiceImpl<TaskStocktakingMappe
         List<TaskStocktakingItem> itemList = taskStocktakingItemMapper.selectList(new LambdaQueryWrapper<TaskStocktakingItem>().eq(TaskStocktakingItem::getTaskStocktakingId, id));
         //已操作数量
         long finishCount = itemList.stream().filter(item -> item.getCreator() != null).count();
+        //操作人数
+        long operCount = itemList.stream().filter(item -> item.getCreator() != null).map(TaskStocktakingItem::getCreator).distinct().count();
         //商品总数量
         long itemCount = itemList.size();
         //商品差异条数
@@ -260,20 +259,27 @@ public class TaskStocktakingServiceImpl extends ServiceImpl<TaskStocktakingMappe
         //差异率
         double differenceRate = 0;
         //准确率
-        double accuracyRate = 0;
+        double accuracyRate = 100;
         if (itemDifferenceCount > 0) {
-            differenceRate = BigDecimal.valueOf(itemCount)
-                    .divide(BigDecimal.valueOf(itemDifferenceCount), 4, RoundingMode.HALF_UP)
+            //差异率 = 商品差异条数/商品总数量*100%
+            differenceRate = BigDecimal.valueOf(itemDifferenceCount)
+                    .divide(BigDecimal.valueOf(itemCount), 4, RoundingMode.HALF_UP)
+                    .multiply(BigDecimal.valueOf(100))
                     .doubleValue();
+            //准确数 = 已操作数量-商品差异条数
             BigDecimal subtract = BigDecimal.valueOf(finishCount).subtract(BigDecimal.valueOf(itemDifferenceCount));
+            //准确率 = 准确数/商品总数量*100%
             if (!subtract.equals(BigDecimal.ZERO)) {
-                accuracyRate = subtract.divide(BigDecimal.valueOf(itemCount), 4, RoundingMode.HALF_UP).doubleValue();
+                accuracyRate = subtract.divide(BigDecimal.valueOf(itemCount), 4, RoundingMode.HALF_UP)
+                        .multiply(BigDecimal.valueOf(100))
+                        .doubleValue();
             }
         }
         detail.setItemCount(itemCount);
         detail.setDifferenceRate(differenceRate);
         detail.setAccuracyRate(accuracyRate);
         detail.setFinishCount(finishCount);
+        detail.setOperCount(operCount);
         return detail;
     }
 

+ 1 - 6
src/main/resources/application-dev.yml

@@ -1,6 +1,6 @@
 server:
   #端口号
-  port: 9080
+  port: 8080
   tomcat:
     basedir: F:/kaifa/temp #文件上传临时路径
 
@@ -33,8 +33,3 @@ aliyun:
 tesco:
   sycnErpMaterialStockUrl: http://localhost:8088/no-auth/erp/sync-stock
   sycnErpMaterialPriceUrl: http://localhost:8088/no-auth/erp/sync-saleprice
-mybatis-plus:
-  configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-    #    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
-    default-executor-type: simple

+ 20 - 0
src/main/resources/mapper_xml/DepotHeadMapper.xml

@@ -746,6 +746,7 @@
       dh.create_time,
       dh.goods_quantity,
       dh.goods_type_count,
+      dh.oper_time,
       s.supplier AS supplier_name,
       dh.status
     FROM
@@ -766,6 +767,25 @@
       </if>
     </where>
       GROUP BY dh.id
+      ORDER BY dh.create_time DESC
+  </select>
+
+  <select id="pdaDetail" resultType="com.jsh.erp.datasource.pda.vo.PDADepotHeadVO">
+    SELECT
+      dh.id,
+      dh.number,
+      dh.create_time,
+      dh.goods_quantity,
+      dh.goods_type_count,
+      dh.oper_time,
+      s.supplier AS supplier_name,
+      dh.status
+    FROM
+      jsh_depot_head dh
+      LEFT JOIN jsh_supplier s ON dh.organ_id = s.id
+      LEFT JOIN jsh
+    WHERE
+      dh.id = #{id}
   </select>
 
   <select id="getDepotLastByMaterialId" resultType="com.jsh.erp.datasource.entities.DepotHead">

+ 1 - 1
src/main/resources/mapper_xml/MaterialExtendMapper.xml

@@ -482,7 +482,7 @@
   </select>
 
   <select id="selectPosition"  resultType="String">
-    SELECT DISTINCT position FROM jsh_material_extend WHERE position IS NOT NULL AND ifnull(delete_Flag,'0') !='1'
+    SELECT DISTINCT position FROM jsh_material_extend WHERE position IS NOT NULL AND position != "" AND ifnull(delete_Flag,'0') !='1'
   </select>
 
 </mapper>

+ 9 - 5
src/main/resources/mapper_xml/MaterialMapperEx.xml

@@ -849,8 +849,8 @@
         ORDER BY m.id DESC, me.default_flag DESC, me.production_date,me.batch_number ASC
     </select>
 
-    <select id="inventoryInquiry" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
-        select m.*,u.name unit_name,mc.name categoryName,me.bar_code,me.id meId,me.commodity_unit,me.sku,
+    <select id="inventoryInquiry" parameterType="com.jsh.erp.datasource.pda.dto.PDAInventoryDTO" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
+        select m.id materialId,m.name materialName,m.standard materialStandard,u.name unit_name,mc.name categoryName,me.bar_code,me.id meId,me.commodity_unit,me.sku,
         me.production_date,me.expiry_num,me.supplier_id,me.batch_number,me.depot_id,me.position,d.`name` depotName,s.supplier supplierName
         from jsh_material m
         left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
@@ -861,15 +861,19 @@
         where m.enabled = 1
         and me.id is not null
         <if test="keyword != null and keyword !=''">
-            <bind name="bindKey" value="'%'+materialParam+'%'"/>
-            and me.batch_number like #{bindKey} or m.name like #{bindKey}
+            <bind name="bindKey" value="'%'+keyword+'%'"/>
+            and (me.batch_number like #{bindKey} or m.name like #{bindKey})
         </if>
         <if test="position != null and position !=''">
             <bind name="bindPosition" value="'%'+position+'%'"/>
             and me.position like #{bindPosition}
         </if>
         <if test="categoryId != null">
-            and m.category_id = #{category_id}
+            and m.category_id IN (
+            <foreach collection="categoryIds" item="item" separator=",">
+                #{item}
+            </foreach>
+            )
         </if>
         <if test="type == 'have'">
             and me.inventory > 0

+ 9 - 1
src/main/resources/mapper_xml/TaskStocktakingItemMapper.xml

@@ -16,6 +16,7 @@
         me.commodity_unit AS commodity_unit,
         tsi.new_inventory AS new_inventory,
         tsi.new_position AS new_position,
+        m.img_name AS img_name,
         tsi.status AS status
         FROM
         task_stocktaking_item tsi
@@ -26,6 +27,11 @@
         <where>
             tsi.delete_flag = 0
             AND tsi.task_stocktaking_id = #{taskId}
+            <if test="number != null and number != ''">
+                m.name LIKE CONCAT('%',#{number},'%')
+                OR me.batch_number LIKE CONCAT('%',#{number},'%')
+                OR m.system_sku LIKE CONCAT('%',#{number},'%')
+            </if>
             <if test="userIdList != null and userIdList.size > 0">
                 AND tsi.creator IN
                 <foreach collection="userIdList" item="item" open="(" separator="," close=")">
@@ -119,7 +125,9 @@
         WHERE
             tsi.delete_flag = 0
             AND tsi.creator IS NOT NULL
-            AND tsi.task_stocktaking_id = #{taskId};
+            AND tsi.task_stocktaking_id = #{taskId}
+        GROUP BY
+            tsi.creator
     </select>
 
 </mapper>