Эх сурвалжийг харах

Merge branch 'xq' of http://121.40.253.172:3000/pengyue/jsh_erp into master_liaozeyong

廖泽勇 1 сар өмнө
parent
commit
026bdb3f41

+ 1 - 1
jshERP-web/src/api/api.js

@@ -100,7 +100,7 @@ const addUnit = (params) => postAction('/unit/add', params)
 const editUnit = (params) => putAction('/unit/update', params)
 const checkUnit = (params) => getAction('/unit/checkIsNameExist', params)
 // 根据id获取信息
-const getUnitInfo = (params) => getAction('/unit/info', params)
+const getUnitInfo = (params) => getAction('/unit/getUnitListByID', params)
 
 //供应商|客户|会员
 const addSupplier = (params) => postAction('/supplier/add', params)

+ 65 - 33
jshERP-web/src/components/jeecg/JEditableTable.vue

@@ -253,16 +253,15 @@
                             @search="(v) => handleSearchSelect(v, id, row, col)"
                             @blur="(v) => handleBlurSearch(v, id, row, col)"
                             @focus="(v) => handleFocusSearch(v, id, row, col)"
-                            allowClear
                           >
                             <div slot="dropdownRender" slot-scope="menu">
                               <v-nodes :vnodes="menu" />
                               <slot name="depotAdd" v-if="col.key === 'depotId'" :target="getVM()" />
                               <slot name="inOutItemAdd" v-if="col.key === 'inOutItemId'" :target="getVM()" />
                             </div>
-                            <!--<template v-for="(opt,optKey) in col.options">-->
-                            <!--<a-select-option :value="opt.value" :key="optKey">{{ opt.title }}</a-select-option>-->
-                            <!--</template>-->
+                            <!-- <template v-for="(opt, optKey) in col.options">
+                              <a-select-option :value="opt.value" :key="optKey">{{ opt.title }}</a-select-option>
+                            </template> -->
                           </a-select>
                         </span>
                       </a-tooltip>
@@ -482,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 -->
 
@@ -878,6 +878,7 @@
                             :allValues="_getAllValuesForSlot()"
                             :target="getVM()"
                             :handleChange="(v) => handleChangeSlotCommon(v, id, row, col)"
+                            :handleFocus="(v) => handleFocusSlotCommon(v, id, row, col)"
                             :isNotPass="notPassedIds.includes(col.key + row.id)"
                           />
                         </span>
@@ -945,11 +946,13 @@ import { getFileAccessHttpUrl } from '@/api/manage'
 import JInputPop from '@/components/jeecg/minipop/JInputPop'
 import JFilePop from '@/components/jeecg/minipop/JFilePop'
 import JSelectList from '@/components/jeecgbiz/JSelectList'
+import { BillModalMixin } from '../../../src/views/bill/mixins/BillModalMixin'
 
 // 行高,需要在实例加载完成前用到
 let rowHeight = 42
 
 export default {
+  mixins: [BillModalMixin],
   name: 'JEditableTable',
   components: {
     JDate,
@@ -2509,6 +2512,35 @@ export default {
       // 触发valueChange 事件
       this.elemValueChange(FormTypes.slot, row, column, value)
     },
+    handleFocusSlotCommon(value, id, row, column) {
+      // this.slotValues = this.bindValuesChange(value, id, 'slotValues')
+      // // 做单个表单验证
+      this.validateOneInput(value, row, column, this.notPassedIds, true, 'focus')
+      // // 触发valueChange 事件
+      this.elemFocusChange(FormTypes.slot, row, column, value)
+    },
+    //获取焦点时触发
+    elemFocusChange(type, rowSource, columnSource, value) {
+      let unitList = []
+      let column = Object.assign({}, columnSource)
+      // 将caseId去除
+      let row = Object.assign({}, rowSource)
+      row.id = this.getCleanId(row.id)
+      // 获取整行的数据
+      let { values } = this.getValuesSync({ validate: false, rowIds: [row.id] })
+      if (values.length > 0) {
+        Object.assign(row, values[0])
+      }
+      if (!row.unitId) {
+        unitList = []
+      }
+      let arr = row.unitList
+      if (arr && !Array.isArray(arr)) {
+        unitList = JSON.parse(arr)
+      }
+      column.options = unitList
+      this.$emit('focusChange', unitList)
+    },
     handleBlurCommono(target, index, row, column) {
       let { value, dataset } = target
       if (dataset && `${dataset.inputNumber}` === 'true') {

+ 1 - 1
jshERP-web/src/views/bill/OtherInList.vue

@@ -1,7 +1,7 @@
 <template>
   <a-row :gutter="24">
     <a-col :md="24">
-      <a-card :style="cardStyle" :bordered="false">
+      <a-card :bordered="false">
         <!-- 查询区域 -->
         <div class="table-page-search-wrapper">
           <!-- 搜索区域 -->

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

@@ -1588,29 +1588,48 @@ 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 },
-        { title: '名称', dataIndex: 'name', width: 90 },
+        { title: '名称', dataIndex: 'name', width: 115 },
         { title: '规格', dataIndex: 'standard', width: 90 },
 
         { title: '生产日期', dataIndex: 'productionDate', width: 100 },
@@ -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' },
@@ -1751,71 +1804,112 @@ export default {
         { title: '备注', dataIndex: 'remark' },
       ],
       otherInColumns: [
-        { 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: '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 },
       ],
       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' },

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

@@ -25,6 +25,7 @@ export const BillModalMixin = {
       supList: [],
       cusList: [],
       retailList: [],
+      // unitList: [],
       personList: {
         options: [],
         value: '',
@@ -151,6 +152,10 @@ export const BillModalMixin = {
             for (let i = 0; i < tab.dataSource.length; i++) {
               let info = tab.dataSource[i]
               info.isEdit = this.model.id ? 1 : 0
+              if (info.unitId) {
+                info.unitList = JSON.stringify(info.unitList)
+              }
+
               this.changeColumnShow(info)
             }
             typeof success === 'function' ? success(res) : ''
@@ -160,6 +165,7 @@ export const BillModalMixin = {
           tab.loading = false
         })
     },
+
     //改变字段的状态,1-显示 0-隐藏
     changeFormTypes(columns, key, type) {
       for (let i = 0; i < columns.length; i++) {
@@ -485,6 +491,9 @@ export const BillModalMixin = {
                   let mArr = values
                   for (let i = 0; i < mList.length; i++) {
                     let mInfo = mList[i]
+                    if (mInfo.unitId) {
+                      mInfo.unitList = JSON.stringify(mInfo.unitList)
+                    }
                     this.changeColumnShow(mInfo)
                     let mObj = this.parseInfoToObj(mInfo)
                     mObj.depotId = mInfo.depotId
@@ -521,6 +530,9 @@ export const BillModalMixin = {
                   if (res && res.code === 200) {
                     let mArr = []
                     let mInfo = mList[0]
+                    if (mInfo.unitId) {
+                      mInfo.unitList = JSON.stringify(mInfo.unitList)
+                    }
                     this.changeColumnShow(mInfo)
                     let mInfoEx = this.parseInfoToObj(mInfo)
                     mInfoEx.stock = res.data.stock
@@ -678,10 +690,20 @@ export const BillModalMixin = {
           that.autoChangePrice(target)
           break
         case 'unit':
-          if (!row.unitId) return
-          getUnitInfo({ id: row.unitId }).then((res) => {
-            console.log('----------------sdsafds', res)
-          })
+          // row.actualQuantityInStorage=
+          if (row.unitId) {
+            let arr = row.unitList
+            if (!Array.isArray(arr)) {
+              arr = JSON.parse(arr)
+            }
+            for (let i of arr) {
+              if (i.name === value) {
+                target.setValues([{ rowKey: row.id, values: { actualQuantityInStorage: i.ratio, unitName: i.name } }])
+              }
+            }
+          }
+
+          target.$forceUpdate()
       }
     },
     //转为商品对象
@@ -714,6 +736,7 @@ export const BillModalMixin = {
         warehousingUser: mInfo.warehousingUser,
         warehousingTime: mInfo.warehousingTime,
         unitId: mInfo.unitId,
+        unitList: mInfo.unitList,
       }
     },
     //使得型号、颜色、扩展信息、sku等为隐藏
@@ -727,6 +750,9 @@ export const BillModalMixin = {
     },
     //使得sku、序列号、批号、到期日等为显示
     changeColumnShow(info) {
+      // if (info.util) {
+      //   this.changeUnitType(this.materialTable.columns, info, 'unit')
+      // }
       if (info.model) {
         this.changeFormTypes(this.materialTable.columns, 'model', 1)
       }

+ 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/OtherInModal.vue

@@ -93,6 +93,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -131,6 +132,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">
@@ -275,7 +293,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.select },
+          {
+            title: '单位',
+            key: 'unit',
+            width: '4%',
+            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: 'snAdd', multi: true },
           { title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.date },
           { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
@@ -326,6 +354,7 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
   created() {},
@@ -455,6 +484,9 @@ export default {
         })
       }
     },
+    getUnitInfo(val) {
+      this.unitList = val
+    },
   },
 }
 </script>

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

+ 34 - 2
jshERP-web/src/views/bill/modules/PurchaseInModal.vue

@@ -111,6 +111,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -156,6 +157,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">
@@ -454,8 +472,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.select, options: [] },
+          {
+            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: 'snAdd', multi: true },
           { title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.date },
           { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
@@ -527,8 +554,10 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
+
   created() {},
   methods: {
     //调用完edit()方法之后会自动调用此方法
@@ -631,6 +660,7 @@ export default {
       billMain.subType = '采购'
       for (let item of detailArr) {
         totalPrice += item.allPrice - 0
+        // delete item.unitList
       }
       billMain.totalPrice = 0 - totalPrice
       billMain.changeAmount = 0 - billMain.changeAmount
@@ -654,7 +684,6 @@ export default {
         billMain.id = this.model.id
       }
       billMain.status = this.billStatus
-
       return {
         info: JSON.stringify(billMain),
         rows: JSON.stringify(detailArr),
@@ -727,6 +756,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>

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

@@ -113,6 +113,7 @@
           @valueChange="onValueChange"
           @added="onAdded"
           @deleted="onDeleted"
+          @focusChange="getUnitInfo"
         >
           <template #buttonAfter>
             <a-row
@@ -158,6 +159,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">
@@ -476,7 +494,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: 'expirationDate', width: '7%', type: FormTypes.input, readonly: true },
           { title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
@@ -548,6 +576,7 @@ export default {
         edit: '/depotHead/updateDepotHeadAndDetail',
         detailList: '/depotItem/getDetailList',
       },
+      unitList: [],
     }
   },
   created() {},
@@ -761,6 +790,9 @@ export default {
         }
       }
     },
+    getUnitInfo(val) {
+      this.unitList = val
+    },
   },
 }
 </script>

+ 0 - 1
jshERP-web/src/views/material/mixins/MaterialModalMixins.js

@@ -16,7 +16,6 @@ export const MaterialModalMixins = {
     addVendor() {
       this.$refs.vendorModalForm.add()
       this.$refs.vendorModalForm.title = '新增供应商'
-      console.log('this.$refs.vendorModalForm------------', this.$refs.vendorModalForm)
       this.$refs.vendorModalForm.disableSubmit = false
     },
     addDepot() {

+ 1 - 0
jshERP-web/src/views/material/modules/MaterialModal.vue

@@ -969,6 +969,7 @@ export default {
       getAction(url, params)
         .then((res) => {
           tab.dataSource = res.data || []
+          console.log('====================', res.data)
         })
         .finally(() => {
           tab.loading = false