15102826049 пре 1 месец
родитељ
комит
281e563285

+ 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>