ソースを参照

Merge remote-tracking branch 'origin/master_liaozeyong'

13660505945 1 ヶ月 前
コミット
cd1d79b461

+ 30 - 29
jshERP-web/src/components/jeecg/JEditableTable.vue

@@ -481,36 +481,37 @@
 
                     <!-- update-begin-author:jsh date:20210308 for:popupJsh -->
                     <template v-else-if="col.type === formTypes.popupJsh">
-                      <a-tooltip
-                        :key="i"
-                        :id="id"
-                        placement="top"
-                        :title="(tooltips[id] || {}).title"
-                        :visible="(tooltips[id] || {}).visible || false"
-                        :autoAdjustOverflow="true"
-                        :getPopupContainer="getParentContainer"
-                      >
-                        <span
-                          @mouseover="
-                            () => {
-                              handleMouseoverCommono(row, col)
-                            }
-                          "
-                          @mouseout="
-                            () => {
-                              handleMouseoutCommono(row, col)
-                            }
-                          "
+                      <div style="max-width: 200px" :key="i">
+                        <a-tooltip
+                          :id="id"
+                          placement="top"
+                          :title="(tooltips[id] || {}).title"
+                          :visible="(tooltips[id] || {}).visible || false"
+                          :autoAdjustOverflow="true"
+                          :getPopupContainer="getParentContainer"
                         >
-                          <j-select-list
-                            :rows="getPopupJshRows(row)"
-                            :kind="col.kind"
-                            :multi="col.multi"
-                            :value="getPopupJshValue(id)"
-                            @change="(v) => handleChangePopupJshCommon(v, id, row, col, rowIndex)"
-                          />
-                        </span>
-                      </a-tooltip>
+                          <span
+                            @mouseover="
+                              () => {
+                                handleMouseoverCommono(row, col)
+                              }
+                            "
+                            @mouseout="
+                              () => {
+                                handleMouseoutCommono(row, col)
+                              }
+                            "
+                          >
+                            <j-select-list
+                              :rows="getPopupJshRows(row)"
+                              :kind="col.kind"
+                              :multi="col.multi"
+                              :value="getPopupJshValue(id)"
+                              @change="(v) => handleChangePopupJshCommon(v, id, row, col, rowIndex)"
+                            />
+                          </span>
+                        </a-tooltip>
+                      </div>
                     </template>
                     <!-- update-end-author:jsh date:20210308 for:popupJsh -->
 

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

@@ -1588,25 +1588,44 @@ export default {
         { title: '备注', dataIndex: 'remark' },
       ],
       purchaseOrderColumns: [
-        { title: '条码', dataIndex: 'barCode' },
-        { title: '名称', dataIndex: 'name' },
-        { title: '规格', dataIndex: 'standard' },
-        { title: '型号', dataIndex: 'model' },
-        { title: '颜色', dataIndex: 'color' },
-        { title: '品牌', dataIndex: 'brand' },
-        { title: '制造商', dataIndex: 'mfrs' },
-        { title: '扩展信息', dataIndex: 'materialOther' },
-        { title: '库存', dataIndex: 'stock' },
-        { title: '单位', dataIndex: 'unit' },
-        { title: '多属性', dataIndex: 'sku' },
-        { title: '数量', dataIndex: 'operNumber' },
-        { title: '已采购', dataIndex: 'finishNumber' },
-        { title: '单价', dataIndex: 'unitPrice' },
-        { title: '金额', dataIndex: 'allPrice' },
-        { title: '税率(%)', dataIndex: 'taxRate' },
-        { title: '税额', dataIndex: 'taxMoney' },
-        { title: '价税合计', dataIndex: 'taxLastMoney' },
-        { title: '备注', dataIndex: 'remark' },
+        { title: '批次号', dataIndex: 'batchNumber', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
+        { title: '规格', dataIndex: 'standard', width: 90 },
+
+        { title: '生产日期', dataIndex: 'productionDate', width: 100 },
+        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        { title: '商品条码', dataIndex: 'barCode', width: 90 },
+        { title: '仓库名称', dataIndex: 'depotName', width: 90 },
+        { title: '仓库货架', dataIndex: 'position', width: 90 },
+        { title: '包装规格', dataIndex: 'unitName', width: 90 },
+
+        { title: '型号', dataIndex: 'model', width: 60 },
+        { title: '颜色', dataIndex: 'color', width: 60 },
+        { title: '品牌', dataIndex: 'brand', width: 90 },
+        { title: '制造商', dataIndex: 'mfrs', width: 90 },
+        { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
+        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '单位', dataIndex: 'unit', width: 90 },
+        { title: '序列号', dataIndex: 'snList', width: 300 },
+        { title: '有效期', dataIndex: 'expirationDate', width: 90 },
+        { title: '多属性', dataIndex: 'sku', width: 90 },
+        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '已入库', dataIndex: 'finishNumber', width: 90 },
+        { title: '单价', dataIndex: 'unitPrice', width: 90 },
+        { title: '金额', dataIndex: 'allPrice', width: 90 },
+        { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
+        { title: '税额', dataIndex: 'taxMoney', width: 90 },
+        { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
+
+        { title: '实际入库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
+        { title: '入库差异', dataIndex: 'warehousingVariance', width: 90 },
+        { title: '入库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
+        { title: '入库人', dataIndex: 'warehousingUser', width: 90 },
+        { title: '入库时间', dataIndex: 'warehousingTime', width: 90 },
+
+        { title: '重量', dataIndex: 'weight', width: 90 },
+        { title: '仓位货架', dataIndex: 'position', width: 90 },
+        { title: '备注', dataIndex: 'remark', width: 90 },
       ],
       purchaseInColumns: [
         { title: '批次号', dataIndex: 'batchNumber', width: 90 },
@@ -1676,52 +1695,86 @@ export default {
         { title: '备注', dataIndex: 'remark' },
       ],
       saleOrderColumns: [
-        { title: '条码', dataIndex: 'barCode' },
-        { title: '名称', dataIndex: 'name' },
-        { title: '规格', dataIndex: 'standard' },
-        { title: '型号', dataIndex: 'model' },
-        { title: '颜色', dataIndex: 'color' },
-        { title: '品牌', dataIndex: 'brand' },
-        { title: '制造商', dataIndex: 'mfrs' },
-        { title: '扩展信息', dataIndex: 'materialOther' },
-        { title: '库存', dataIndex: 'stock' },
-        { title: '单位', dataIndex: 'unit' },
-        { title: '多属性', dataIndex: 'sku' },
-        { title: '数量', dataIndex: 'operNumber' },
-        { title: '已销售', dataIndex: 'finishNumber' },
-        { title: '单价', dataIndex: 'unitPrice' },
-        { title: '金额', dataIndex: 'allPrice' },
-        { title: '税率(%)', dataIndex: 'taxRate' },
-        { title: '税额', dataIndex: 'taxMoney' },
-        { title: '价税合计', dataIndex: 'taxLastMoney' },
-        { title: '备注', dataIndex: 'remark' },
+        { title: '批次号', dataIndex: 'batchNumber', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
+        { title: '规格', dataIndex: 'standard', width: 90 },
+
+        { title: '生产日期', dataIndex: 'productionDate', width: 100 },
+        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        { title: '商品条码', dataIndex: 'barCode', width: 90 },
+        { title: '仓库名称', dataIndex: 'depotName', width: 90 },
+        { title: '仓库货架', dataIndex: 'position', width: 90 },
+        { title: '包装规格', dataIndex: 'unitName', width: 90 },
+
+        { title: '规格', dataIndex: 'standard', width: 60 },
+        { title: '型号', dataIndex: 'model', width: 60 },
+        { title: '颜色', dataIndex: 'color', width: 60 },
+        { title: '品牌', dataIndex: 'brand', width: 90 },
+        { title: '制造商', dataIndex: 'mfrs', width: 90 },
+        { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
+        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '单位', dataIndex: 'unit', width: 90 },
+        { title: '序列号', dataIndex: 'snList', width: 300 },
+        { title: '有效期', dataIndex: 'expirationDate', width: 90 },
+        { title: '多属性', dataIndex: 'sku', width: 90 },
+        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '已出库', dataIndex: 'finishNumber', width: 90 },
+        { title: '单价', dataIndex: 'unitPrice', width: 90 },
+        { title: '金额', dataIndex: 'allPrice', width: 90 },
+        { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
+        { title: '税额', dataIndex: 'taxMoney', width: 90 },
+        { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
+
+        { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
+        { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
+        { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
+        { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
+        { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
+
+        { title: '重量', dataIndex: 'weight', width: 90 },
+        { title: '仓位货架', dataIndex: 'position', width: 90 },
+        { title: '备注', dataIndex: 'remark', width: 90 },
       ],
       saleOutColumns: [
-        { title: '仓库名称', dataIndex: 'depotName' },
-        { title: '条码', dataIndex: 'barCode' },
-        { title: '名称', dataIndex: 'name' },
-        { title: '规格', dataIndex: 'standard' },
-        { title: '型号', dataIndex: 'model' },
-        { title: '颜色', dataIndex: 'color' },
-        { title: '品牌', dataIndex: 'brand' },
-        { title: '制造商', dataIndex: 'mfrs' },
-        { title: '扩展信息', dataIndex: 'materialOther' },
-        { title: '库存', dataIndex: 'stock' },
-        { title: '单位', dataIndex: 'unit' },
+        { title: '批次号', dataIndex: 'batchNumber', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
+        { title: '规格', dataIndex: 'standard', width: 90 },
+
+        { title: '生产日期', dataIndex: 'productionDate', width: 100 },
+        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        { title: '商品条码', dataIndex: 'barCode', width: 90 },
+        { title: '仓库名称', dataIndex: 'depotName', width: 90 },
+        { title: '仓库货架', dataIndex: 'position', width: 90 },
+        { title: '包装规格', dataIndex: 'unitName', width: 90 },
+
+        { title: '规格', dataIndex: 'standard', width: 60 },
+        { title: '型号', dataIndex: 'model', width: 60 },
+        { title: '颜色', dataIndex: 'color', width: 60 },
+        { title: '品牌', dataIndex: 'brand', width: 90 },
+        { title: '制造商', dataIndex: 'mfrs', width: 90 },
+        { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
+        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
-        { title: '批号', dataIndex: 'batchNumber' },
-        { title: '有效期', dataIndex: 'expirationDate' },
-        { title: '多属性', dataIndex: 'sku' },
-        { title: '数量', dataIndex: 'operNumber' },
-        { title: '已出库', dataIndex: 'finishNumber' },
-        { title: '单价', dataIndex: 'unitPrice' },
-        { title: '金额', dataIndex: 'allPrice' },
-        { title: '税率(%)', dataIndex: 'taxRate' },
-        { title: '税额', dataIndex: 'taxMoney' },
-        { title: '价税合计', dataIndex: 'taxLastMoney' },
-        { title: '重量', dataIndex: 'weight' },
-        { title: '仓位货架', dataIndex: 'position' },
-        { title: '备注', dataIndex: 'remark' },
+        { title: '有效期', dataIndex: 'expirationDate', width: 90 },
+        { title: '多属性', dataIndex: 'sku', width: 90 },
+        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '已出库', dataIndex: 'finishNumber', width: 90 },
+        { title: '单价', dataIndex: 'unitPrice', width: 90 },
+        { title: '金额', dataIndex: 'allPrice', width: 90 },
+        { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
+        { title: '税额', dataIndex: 'taxMoney', width: 90 },
+        { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
+
+        { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
+        { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
+        { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
+        { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
+        { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
+
+        { title: '重量', dataIndex: 'weight', width: 90 },
+        { title: '仓位货架', dataIndex: 'position', width: 90 },
+        { title: '备注', dataIndex: 'remark', width: 90 },
       ],
       saleBackColumns: [
         { title: '仓库名称', dataIndex: 'depotName' },
@@ -1786,48 +1839,77 @@ export default {
         { title: '仓位货架', dataIndex: 'position', width: 90 },
       ],
       otherOutColumns: [
-        { title: '仓库名称', dataIndex: 'depotName' },
-        { title: '条码', dataIndex: 'barCode' },
-        { title: '名称', dataIndex: 'name' },
-        { title: '规格', dataIndex: 'standard' },
-        { title: '型号', dataIndex: 'model' },
-        { title: '颜色', dataIndex: 'color' },
-        { title: '品牌', dataIndex: 'brand' },
-        { title: '制造商', dataIndex: 'mfrs' },
-        { title: '扩展信息', dataIndex: 'materialOther' },
-        { title: '库存', dataIndex: 'stock' },
-        { title: '单位', dataIndex: 'unit' },
+        { title: '批次号', dataIndex: 'batchNumber', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
+        { title: '规格', dataIndex: 'standard', width: 90 },
+
+        { title: '生产日期', dataIndex: 'productionDate', width: 100 },
+        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        { title: '商品条码', dataIndex: 'barCode', width: 90 },
+        { title: '仓库名称', dataIndex: 'depotName', width: 90 },
+        { title: '仓库货架', dataIndex: 'position', width: 90 },
+        { title: '包装规格', dataIndex: 'unitName', width: 90 },
+
+        { title: '规格', dataIndex: 'standard', width: 60 },
+        { title: '型号', dataIndex: 'model', width: 60 },
+        { title: '颜色', dataIndex: 'color', width: 60 },
+        { title: '品牌', dataIndex: 'brand', width: 90 },
+        { title: '制造商', dataIndex: 'mfrs', width: 90 },
+        { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
+        { title: '库存', dataIndex: 'stock', width: 90 },
+        { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '序列号', dataIndex: 'snList', width: 300 },
-        { title: '批号', dataIndex: 'batchNumber' },
-        { title: '有效期', dataIndex: 'expirationDate' },
-        { title: '多属性', dataIndex: 'sku' },
-        { title: '数量', dataIndex: 'operNumber' },
-        { title: '单价', dataIndex: 'unitPrice' },
-        { title: '金额', dataIndex: 'allPrice' },
-        { title: '重量', dataIndex: 'weight' },
-        { title: '仓位货架', dataIndex: 'position' },
-        { title: '备注', dataIndex: 'remark' },
+        { title: '有效期', dataIndex: 'expirationDate', width: 90 },
+        { title: '多属性', dataIndex: 'sku', width: 90 },
+        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '单价', dataIndex: 'unitPrice', width: 90 },
+        { title: '金额', dataIndex: 'allPrice', width: 90 },
+
+        { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
+        { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
+        { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
+        { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
+        { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
+
+        { title: '重量', dataIndex: 'weight', width: 90 },
+        { title: '仓位货架', dataIndex: 'position', width: 90 },
+        { title: '备注', dataIndex: 'remark', width: 90 },
       ],
       allocationOutColumns: [
-        { title: '仓库名称', dataIndex: 'depotName' },
-        { title: '条码', dataIndex: 'barCode' },
-        { title: '名称', dataIndex: 'name' },
-        { title: '规格', dataIndex: 'standard' },
-        { title: '型号', dataIndex: 'model' },
-        { title: '颜色', dataIndex: 'color' },
-        { title: '品牌', dataIndex: 'brand' },
-        { title: '制造商', dataIndex: 'mfrs' },
-        { title: '扩展信息', dataIndex: 'materialOther' },
-        { title: '库存', dataIndex: 'stock' },
+        { title: '批次号', dataIndex: 'batchNumber', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
+        { title: '规格', dataIndex: 'standard', width: 90 },
+
+        { title: '生产日期', dataIndex: 'productionDate', width: 100 },
+        { title: '保质期', dataIndex: 'expiryNum', width: 60 },
+        { title: '商品条码', dataIndex: 'barCode', width: 90 },
+        { title: '仓库名称', dataIndex: 'depotName', width: 90 },
+        { title: '仓库货架', dataIndex: 'position', width: 90 },
+        { title: '包装规格', dataIndex: 'unitName', width: 90 },
+
+        { title: '规格', dataIndex: 'standard', width: 60 },
+        { title: '型号', dataIndex: 'model', width: 60 },
+        { title: '颜色', dataIndex: 'color', width: 60 },
+        { title: '品牌', dataIndex: 'brand', width: 90 },
+        { title: '制造商', dataIndex: 'mfrs', width: 90 },
+        { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
+        { title: '库存', dataIndex: 'stock', width: 90 },
         { title: '调入仓库', dataIndex: 'anotherDepotName' },
-        { title: '单位', dataIndex: 'unit' },
+        { title: '单位', dataIndex: 'unit', width: 90 },
         { title: '多属性', dataIndex: 'sku' },
-        { title: '数量', dataIndex: 'operNumber' },
-        { title: '单价', dataIndex: 'unitPrice' },
-        { title: '金额', dataIndex: 'allPrice' },
-        { title: '重量', dataIndex: 'weight' },
-        { title: '仓位货架', dataIndex: 'position' },
-        { title: '备注', dataIndex: 'remark' },
+        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '单价', dataIndex: 'unitPrice', width: 90 },
+        { title: '金额', dataIndex: 'allPrice', width: 90 },
+
+        { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
+        { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
+        { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
+        { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
+        { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
+
+        { title: '重量', dataIndex: 'weight', width: 90 },
+        { title: '仓位货架', dataIndex: 'position', width: 90 },
+        { title: '备注', dataIndex: 'remark', width: 90 },
       ],
       assembleColumns: [
         { title: '商品类型', dataIndex: 'mType' },

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

@@ -698,7 +698,7 @@ export const BillModalMixin = {
             }
             for (let i of arr) {
               if (i.name === value) {
-                target.setValues([{ rowKey: row.id, values: { actualQuantityInStorage: i.ratio } }])
+                target.setValues([{ rowKey: row.id, values: { actualQuantityInStorage: i.ratio, unitName: i.name } }])
               }
             }
           }

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

@@ -52,6 +52,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -86,6 +87,23 @@
               <a-icon type="plus" /> 新增仓库
             </div>
           </template>
+          <template #unit="{ handleChange, handleFocus, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['unit']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+              <a-select-option v-for="(item, index) in unitList" :key="index" :value="item.name">
+                {{ item.name }}
+              </a-select-option>
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -178,18 +196,8 @@ export default {
         dataSource: [],
         columns: [
           {
-            title: '仓库名称',
-            key: 'depotId',
-            width: '8%',
-            type: FormTypes.select,
-            placeholder: '请选择${title}',
-            options: [],
-            allowSearch: true,
-            validateRules: [{ required: true, message: '${title}不能为空' }],
-          },
-          {
-            title: '条码',
-            key: 'barCode',
+            title: '批次号',
+            key: 'batchNumber',
             width: '12%',
             type: FormTypes.popupJsh,
             kind: 'material',
@@ -221,7 +229,17 @@ export default {
             options: [],
             allowSearch: true,
           },
-          { title: '单位', key: 'unit', width: '4%', type: FormTypes.normal },
+          {
+            title: '单位',
+            key: 'unit',
+            width: '6%',
+            type: FormTypes.slot,
+            options: [],
+            allowClear: false,
+            slotName: 'unit',
+          },
+          { title: '单位id', key: 'unitId', width: '4%', type: FormTypes.hidden },
+          { title: '单位列表', key: 'unitList', width: '5%', type: FormTypes.hidden },
           { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
           {
             title: '数量',
@@ -267,6 +285,7 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
   created() {},

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

@@ -94,6 +94,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -132,6 +133,23 @@
               <a-icon type="plus" /> 新增仓库
             </div>
           </template>
+          <template #unit="{ handleChange, handleFocus, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['unit']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+              <a-select-option v-for="(item, index) in unitList" :key="index" :value="item.name">
+                {{ item.name }}
+              </a-select-option>
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -274,7 +292,17 @@ export default {
           { 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: 'unit', width: '4%', type: FormTypes.normal },
+          {
+            title: '单位',
+            key: 'unit',
+            width: '6%',
+            type: FormTypes.slot,
+            options: [],
+            allowClear: false,
+            slotName: 'unit',
+          },
+          { title: '单位id', key: 'unitId', width: '4%', type: FormTypes.hidden },
+          { title: '单位列表', key: 'unitList', width: '5%', type: FormTypes.hidden },
           { title: '序列号', key: 'snList', width: '12%', type: FormTypes.popupJsh, kind: 'sn', multi: true },
           { title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
           { title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.input, readonly: true },
@@ -326,6 +354,7 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
   created() {},
@@ -454,6 +483,9 @@ export default {
         })
       }
     },
+    getUnitInfo(val) {
+      this.unitList = val
+    },
   },
 }
 </script>

+ 62 - 3
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue

@@ -129,6 +129,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -165,6 +166,23 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
+          <template #unit="{ handleChange, handleFocus, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['unit']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+              <a-select-option v-for="(item, index) in unitList" :key="index" :value="item.name">
+                {{ item.name }}
+              </a-select-option>
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -384,8 +402,8 @@ export default {
         columns: [
           { title: '', key: 'hiddenKey', width: '1%', type: FormTypes.hidden },
           {
-            title: '条码',
-            key: 'barCode',
+            title: '批次号',
+            key: 'batchNumber',
             width: '12%',
             type: FormTypes.popupJsh,
             kind: 'material',
@@ -394,13 +412,31 @@ export default {
           },
           { title: '名称', key: 'name', width: '10%', type: FormTypes.normal },
           { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
+
+          { 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: 'position', width: '6%', type: FormTypes.normal },
+          { title: '包装规格', key: 'unitName', width: '6%', type: FormTypes.input },
+
           { title: '型号', key: 'model', width: '9%', type: FormTypes.normal },
           { title: '颜色', key: 'color', width: '5%', type: FormTypes.normal },
           { title: '品牌', key: 'brand', width: '6%', 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: 'unit', width: '4%', type: FormTypes.normal },
+          {
+            title: '单位',
+            key: 'unit',
+            width: '6%',
+            type: FormTypes.slot,
+            options: [],
+            allowClear: false,
+            slotName: 'unit',
+          },
+          { title: '单位id', key: 'unitId', width: '4%', type: FormTypes.hidden },
+          { title: '单位列表', key: 'unitList', width: '5%', type: FormTypes.hidden },
           { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
           { title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
           { title: '已采购', key: 'finishNumber', width: '4%', type: FormTypes.normal },
@@ -414,6 +450,25 @@ export default {
           },
           { title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber },
           { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
+
+          {
+            title: '实际入库数量',
+            key: 'actualQuantityInStorage',
+            width: '9%',
+            type: FormTypes.inputNumber,
+            validateRules: [{ required: true, message: '实际入库数量不能为空' }],
+          },
+          { title: '入库差异', key: 'warehousingVariance', width: '9%', type: FormTypes.input },
+          { title: '入库差异原因', key: 'reasonOfDifference', width: '9%', type: FormTypes.input },
+          {
+            title: '入库人',
+            key: 'warehousingUser',
+            width: '9%',
+            type: FormTypes.input,
+            validateRules: [{ required: true, message: '入库人不能为空' }],
+          },
+          { title: '入库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },
+
           { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber, placeholder: '%' },
           {
             title: '税额',
@@ -443,6 +498,7 @@ export default {
         detailList: '/depotItem/getDetailList',
         importExcelUrl: '/depotItem/importItemExcel',
       },
+      unitList: [],
     }
   },
   created() {},
@@ -613,6 +669,9 @@ export default {
         this.materialTable.dataSource = selectBillDetailRows
       }
     },
+    getUnitInfo(val) {
+      this.unitList = val
+    },
   },
 }
 </script>

+ 70 - 6
jshERP-web/src/views/bill/modules/SaleOrderModal.vue

@@ -110,6 +110,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -145,6 +146,23 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
+          <template #unit="{ handleChange, handleFocus, value }">
+            <a-select
+              placeholder="请选择"
+              v-decorator="['unit']"
+              :dropdownMatchSelectWidth="false"
+              showSearch
+              :allowClear="false"
+              optionFilterProp="children"
+              :value="value"
+              @change="($event) => handleChange($event)"
+              @focus="($event) => handleFocus($event)"
+            >
+              <a-select-option v-for="(item, index) in unitList" :key="index" :value="item.name">
+                {{ item.name }}
+              </a-select-option>
+            </a-select>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -356,8 +374,8 @@ export default {
         columns: [
           { title: '', key: 'hiddenKey', width: '1%', type: FormTypes.hidden },
           {
-            title: '条码',
-            key: 'barCode',
+            title: '批次号',
+            key: 'batchNumber',
             width: '12%',
             type: FormTypes.popupJsh,
             kind: 'material',
@@ -366,23 +384,45 @@ export default {
           },
           { title: '名称', key: 'name', width: '10%', type: FormTypes.normal },
           { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
+
+          { 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: 'position', width: '6%', type: FormTypes.normal },
+          { title: '包装规格', key: 'unitName', width: '6%', type: FormTypes.input },
+
           { title: '型号', key: 'model', width: '9%', type: FormTypes.normal },
           { title: '颜色', key: 'color', width: '5%', type: FormTypes.normal },
           { title: '品牌', key: 'brand', width: '6%', 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: 'unit', width: '4%', type: FormTypes.normal },
-          { title: '多属性', key: 'sku', width: '4%', type: FormTypes.normal },
           {
-            title: '数量',
+            title: '单位',
+            key: 'unit',
+            width: '6%',
+            type: FormTypes.slot,
+            options: [],
+            allowClear: false,
+            slotName: 'unit',
+          },
+          { title: '单位id', key: 'unitId', width: '4%', type: FormTypes.hidden },
+          { title: '单位列表', key: 'unitList', width: '5%', type: FormTypes.hidden },
+          { title: '序列号', key: 'snList', width: '12%', type: FormTypes.popupJsh, kind: 'sn', multi: true },
+          { title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.input, readonly: true },
+          { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
+          { title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
+          { title: '已出库', key: 'finishNumber', width: '4%', type: FormTypes.normal },
+          {
+            title: '出库数量',
             key: 'operNumber',
             width: '5%',
             type: FormTypes.inputNumber,
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '5%', type: FormTypes.inputNumber },
+          { title: '单价', key: 'unitPrice', width: '4%', type: FormTypes.inputNumber },
           { title: '金额', key: 'allPrice', width: '5%', type: FormTypes.inputNumber, statistics: true },
           { title: '税率', key: 'taxRate', width: '4%', type: FormTypes.inputNumber, placeholder: '%' },
           {
@@ -394,7 +434,27 @@ export default {
             statistics: true,
           },
           { title: '价税合计', key: 'taxLastMoney', width: '7%', type: FormTypes.inputNumber, statistics: true },
+
+          {
+            title: '实际出库数量',
+            key: 'actualQuantityInStorage',
+            width: '9%',
+            type: FormTypes.inputNumber,
+            validateRules: [{ required: true, message: '实际入库数量不能为空' }],
+          },
+          { title: '出库差异', key: 'warehousingVariance', width: '9%', type: FormTypes.input },
+          { title: '出库差异原因', key: 'reasonOfDifference', width: '9%', type: FormTypes.input },
+          {
+            title: '出库人',
+            key: 'warehousingUser',
+            width: '9%',
+            type: FormTypes.input,
+            validateRules: [{ required: true, message: '出库人不能为空' }],
+          },
+          { title: '出库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },
+
           { title: '备注', key: 'remark', width: '6%', type: FormTypes.input },
+          { title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
         ],
       },
       confirmLoading: false,
@@ -411,6 +471,7 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
   created() {},
@@ -515,6 +576,9 @@ export default {
       this.$refs.historyBillListModalForm.show('其它', '销售订单', '客户', organId)
       this.$refs.historyBillListModalForm.disableSubmit = false
     },
+    getUnitInfo(val) {
+      this.unitList = val
+    },
   },
 }
 </script>

+ 1 - 1
src/main/java/com/jsh/erp/base/AjaxResult.java

@@ -29,7 +29,7 @@ public class AjaxResult extends HashMap<String, Object>
     public enum Type
     {
         /** 成功 */
-        SUCCESS(0),
+        SUCCESS(200),
         /** 警告 */
         WARN(301),
         /** 错误 */

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

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.entities.DepotItem;
 import com.jsh.erp.datasource.entities.Supplier;
 import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
 import com.jsh.erp.datasource.pda.vo.PDADepotHeadVO;
+import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
 import com.jsh.erp.query.LambdaQueryWrapperX;
 import com.jsh.erp.service.DepotHeadService;
 import com.jsh.erp.service.DepotItemService;
@@ -69,7 +70,7 @@ public class PdaController extends BaseController {
     @ApiOperation("订单明细")
     public TableDataInfo orderDetail(@PathVariable("id") Long id) {
         startPage();
-        List<DepotItem> list = depotItemService.list(new LambdaQueryWrapperX<DepotItem>().eq(DepotItem::getHeaderId, id));
+        List<PDADepotItemVO> list = depotItemService.pdaList(id);
         return getDataTable(list);
     }
 

+ 8 - 5
src/main/java/com/jsh/erp/datasource/entities/Supplier.java

@@ -1,11 +1,14 @@
 package com.jsh.erp.datasource.entities;
 
+import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.math.BigDecimal;
 
 /**
  * 供应商/客户信息表实体类
  *
  */
+@TableName("jsh_supplier")
 public class Supplier {
 
     /** 主键 */
@@ -96,7 +99,7 @@ public class Supplier {
     private String procurementContact;
 
     /** 到货天数(单位:天) */
-    private Integer deliverydays;
+    private Integer deliveryDays;
 
     /** 发票类型:0-普通发票, 1-增值税专用发票 */
     private String invoiceType;
@@ -337,12 +340,12 @@ public class Supplier {
         this.procurementContact = procurementContact == null ? null : procurementContact.trim();;
     }
 
-    public Integer getDeliverydays() {
-        return deliverydays;
+    public Integer getDeliveryDays() {
+        return deliveryDays;
     }
 
-    public void setDeliverydays(Integer deliverydays) {
-        this.deliverydays = deliverydays;
+    public void setDeliveryDays(Integer deliveryDays) {
+        this.deliveryDays = deliveryDays;
     }
 
     public String getInvoiceType() {

+ 10 - 0
src/main/java/com/jsh/erp/datasource/mappers/DepotItemMapper.java

@@ -4,9 +4,19 @@ import com.jsh.erp.datasource.entities.DepotHead;
 import com.jsh.erp.datasource.entities.DepotItem;
 import com.jsh.erp.datasource.entities.DepotItemExample;
 import java.util.List;
+
+import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
 import org.apache.ibatis.annotations.Param;
 
 public interface DepotItemMapper  extends BaseMapperX<DepotItem>{
+
+    /**
+     * 根据单据ID获取单据详情
+     * @param id
+     * @return
+     */
+    List<PDADepotItemVO> pdaList(@Param("id") Long id);
+
     long countByExample(DepotItemExample example);
 
     int deleteByExample(DepotItemExample example);

+ 43 - 0
src/main/java/com/jsh/erp/datasource/pda/vo/PDADepotItemVO.java

@@ -0,0 +1,43 @@
+package com.jsh.erp.datasource.pda.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Accessors
+public class PDADepotItemVO{
+
+    @ApiModelProperty("商品名称")
+    private String materialName;
+
+    @ApiModelProperty("商品规格")
+    private String materialStandard;
+
+    @ApiModelProperty("批次号")
+    private String batchNumber;
+
+    @ApiModelProperty("生产日期")
+    private Date productionDate;
+
+    @ApiModelProperty("商品库位")
+    private String position;
+
+    @ApiModelProperty("商品库存")
+    private String inventory;
+
+    @ApiModelProperty("商品条码")
+    private String barCode;
+
+    @ApiModelProperty("订单数量")
+    private BigDecimal operNumber;
+
+    @ApiModelProperty("库存单位")
+    private String commodityUnit;
+
+    @ApiModelProperty("商品单位")
+    private String materialUnit;
+}

+ 8 - 0
src/main/java/com/jsh/erp/service/DepotItemService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jsh.erp.datasource.entities.*;
+import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
 import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
 import com.jsh.erp.datasource.vo.DepotItemVoBatchNumberList;
 import com.jsh.erp.datasource.vo.InOutPriceVo;
@@ -15,6 +16,13 @@ import java.util.List;
 import java.util.Map;
 
 public interface DepotItemService extends IService<DepotItem> {
+
+    /**
+     * pda根据订单信息查询商品列表
+     * @return
+     */
+    List<PDADepotItemVO> pdaList(Long id);
+
     DepotItem getDepotItem(long id)throws Exception;
 
     List<DepotItem> getDepotItem()throws Exception;

+ 10 - 0
src/main/java/com/jsh/erp/service/impl/DepotItemServiceImpl.java

@@ -7,6 +7,7 @@ import com.jsh.erp.constants.BusinessConstants;
 import com.jsh.erp.constants.ExceptionConstants;
 import com.jsh.erp.datasource.entities.*;
 import com.jsh.erp.datasource.mappers.*;
+import com.jsh.erp.datasource.pda.vo.PDADepotItemVO;
 import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
 import com.jsh.erp.datasource.vo.DepotItemVo4Stock;
 import com.jsh.erp.datasource.vo.DepotItemVoBatchNumberList;
@@ -66,6 +67,15 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
     @Resource
     private LogService logService;
 
+    /**
+     * pda根据订单信息查询商品列表
+     * @return
+     */
+    @Override
+    public List<PDADepotItemVO> pdaList(Long id) {
+        return depotItemMapper.pdaList(id);
+    }
+
     @Override
     public DepotItem getDepotItem(long id)throws Exception {
         DepotItem result=null;

+ 2 - 2
src/main/java/com/jsh/erp/service/impl/SupplierServiceImpl.java

@@ -460,7 +460,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
                 s.setSettlementMethod(ExcelUtils.getContent(src, i, 12));
                 s.setBillingCycleDays(parseIntegerFromExcel(ExcelUtils.getContent(src, i, 13)));
                 s.setProcurementContact(ExcelUtils.getContent(src, i, 14));
-                s.setDeliverydays(parseIntegerFromExcel(ExcelUtils.getContent(src, i, 15)));
+                s.setDeliveryDays(parseIntegerFromExcel(ExcelUtils.getContent(src, i, 15)));
                 s.setDescription(ExcelUtils.getContent(src, i, 16));
                 s.setSort(ExcelUtils.getContent(src, i, 17));
                 s.setCreator(userInfo==null?null:userInfo.getId());
@@ -670,7 +670,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
                 // 采购对接人
                 objs[14] = s.getProcurementContact();
                 // 到货天数
-                objs[15] = s.getDeliverydays() == null? "" : s.getDeliverydays().toString();
+                objs[15] = s.getDeliveryDays() == null? "" : s.getDeliveryDays().toString();
                 objs[16] = s.getDescription();
                 objs[17] = s.getSort();
                 objs[18] = s.getEnabled() ? "1" : "0";

+ 21 - 0
src/main/resources/mapper_xml/DepotItemMapper.xml

@@ -563,4 +563,25 @@
       delete_flag = #{deleteFlag,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+  <select id="pdaList" resultType="com.jsh.erp.datasource.pda.vo.PDADepotItemVO">
+    SELECT
+      m.`name` AS material_name,
+      m.standard AS material_standard,
+      me.batch_number AS batch_number,
+      me.production_date AS production_date,
+      me.position AS position,
+	  me.inventory AS inventory,
+	  me.bar_code AS bar_code,
+	  di.oper_number AS oper_number,
+      me.commodity_unit AS commodity_unit,
+      di.material_unit AS material_unit
+    FROM
+      jsh_depot_item di
+    LEFT JOIN jsh_material m ON di.material_id = m.id
+    LEFT JOIN jsh_material_extend me ON di.material_extend_id = me.id
+    WHERE
+      di.delete_flag = '0'
+      AND di.header_id = #{id}
+  </select>
 </mapper>