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

Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into master_huangjunjie

huang 1 сар өмнө
parent
commit
2a0707c0e5

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

@@ -3306,6 +3306,7 @@ export default {
         overflow: hidden;
         white-space: nowrap;
         text-overflow: ellipsis;
+        max-width: 150px;
       }
     }
   }

+ 3 - 1
jshERP-web/src/components/jeecg/JUpload.vue

@@ -231,7 +231,9 @@ export default {
       let fileList = []
       let arr = paths.split(',')
       for (var a = 0; a < arr.length; a++) {
-        let url = getFileAccessHttpUrl('systemConfig/static/' + arr[a])
+        // let url = getFileAccessHttpUrl('systemConfig/static/' + arr[a])
+        let url = getFileAccessHttpUrl(arr[a])
+
         fileList.push({
           uid: uidGenerator(),
           name: getFileName(arr[a]),

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

@@ -93,14 +93,14 @@
                     </a-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="6" :sm="24">
+                <!-- <a-col :md="6" :sm="24">
                   <a-form-item label="批号" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
                     <a-select placeholder="有无批号" v-model="queryParam.enableBatchNumber">
                       <a-select-option value="1">有</a-select-option>
                       <a-select-option value="0">无</a-select-option>
                     </a-select>
                   </a-form-item>
-                </a-col>
+                </a-col> -->
               </template>
             </a-row>
           </a-form>

+ 29 - 3
jshERP-web/src/mixins/newTableMixin.js

@@ -5,8 +5,8 @@ export const newTableMixin = {
     return {
       ipagination: {
         current: 1,
-        pageSize: 2,
-        pageSizeOptions: ['2', '20', '30', '50', '100'],
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30', '50', '100'],
         showTotal: (total, range) => {
           return range[0] + '-' + range[1] + ' 共' + total + '条'
         },
@@ -29,6 +29,7 @@ export const newTableMixin = {
     }
   },
   methods: {
+    //table功能
     onSelectChange(selectedRowKeys, selectionRows) {
       this.selectedRowKeys = selectedRowKeys
       this.selectionRows = selectionRows
@@ -49,6 +50,23 @@ export const newTableMixin = {
       }
       this.getList()
     },
+    //禁止点击表格某一行
+    getCheckboxProps(record) {
+      return {
+        props: {
+          disabled: record.taskStatus !== 1,
+        },
+      }
+    },
+    getTaskkboxProps(record) {
+      return {
+        props: {
+          disabled: record.taskStatus !== 1 || record.taskStatus !== 4,
+        },
+      }
+    },
+
+    // --------------------------------------------------------------------
     formateTaskStatus(type) {
       switch (type) {
         case 1:
@@ -63,10 +81,18 @@ export const newTableMixin = {
           return ''
       }
     },
+    onSearch() {
+      this.ipagination.current = 1
+      this.getList()
+    },
+    onReset() {
+      this.queryParam = {}
+      this.onSearch()
+      this.$forceUpdate()
+    },
     edit(id, col) {
       this.editableData[id] = cloneDeep(this.dataSource.filter((item) => id === item.id)[0])
       this.$forceUpdate()
-      console.log('111111111111111111111', col)
     },
     save(id) {
       Object.assign(this.dataSource.filter((item) => id === item.id)[0], this.editableData[id])

+ 1 - 0
jshERP-web/src/views/bill/PurchaseOrderList.vue

@@ -189,6 +189,7 @@
               <a-tag v-if="status == '1'" color="green">已审核</a-tag>
               <a-tag v-if="status == '2'" color="cyan">完成采购</a-tag>
               <a-tag v-if="status == '3'" color="blue">部分采购</a-tag>
+              <a-tag v-if="status == '4'" color="purple">进行中</a-tag>
               <a-tag v-if="status == '9'" color="orange">审核中</a-tag>
             </template>
           </a-table>

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

@@ -558,6 +558,11 @@
                 {{ model.debt }}
               </a-form-item>
             </a-col>
+            <a-col :lg="6" :md="12" :sm="24">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
+                <vue-qr :text="model.number" :size="200" />
+              </a-form-item>
+            </a-col>
             <a-col v-if="model.hasBackFlag" :span="6">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
                 <template v-for="(item, index) in linkNumberList">

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

@@ -484,6 +484,7 @@ export const BillModalMixin = {
           getMaterialByBatchNumber(param).then((res) => {
             if (res && res.code === 200) {
               let mList = res.data
+
               if (value.indexOf(',') > -1) {
                 //多个条码
                 this.$refs.materialDataTable.getValues((error, values) => {
@@ -541,6 +542,7 @@ export const BillModalMixin = {
                       values: mInfoEx,
                     }
                     mArr.push(mObj)
+
                     target.setValues(mArr)
                     target.recalcAllStatisticsColumns()
                     that.autoChangePrice(target)
@@ -698,7 +700,7 @@ export const BillModalMixin = {
             }
             for (let i of arr) {
               if (i.name === value) {
-                target.setValues([{ rowKey: row.id, values: { actualQuantityInStorage: i.ratio, unitName: i.name } }])
+                target.setValues([{ rowKey: row.id, values: { unitName: i.name } }])
               }
             }
           }
@@ -709,7 +711,7 @@ export const BillModalMixin = {
     //转为商品对象
     parseInfoToObj(mInfo) {
       return {
-        barCode: mInfo.mBarCode,
+        barCode: mInfo.barCode,
         batchNumber: mInfo.batchNumber,
         name: mInfo.name,
         standard: mInfo.standard,

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

@@ -294,8 +294,9 @@
             </a-form-item>
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
-            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
+            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次实际付款">
               <a-input
+                disabled
                 placeholder="请输入本次付款"
                 v-decorator.trim="['changeAmount', validatorRules.changeAmount]"
                 @change="onChangeChangeAmount"

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

@@ -319,6 +319,20 @@
             </a-form-item>
           </a-col>
         </a-row>
+        <a-row class="form-row" :gutter="24">
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="凭证图片"
+              data-step="11"
+              data-title="附件"
+              data-intro="可以上传与单据相关的图片、文档,支持多个文件"
+            >
+              <j-image-upload v-model="imageList" bizPath="material" text="上传图片" isMultiple></j-image-upload>
+            </a-form-item>
+          </a-col>
+        </a-row>
       </a-form>
     </a-spin>
     <many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
@@ -347,6 +361,7 @@ import { BillModalMixin } from '../mixins/BillModalMixin'
 import { findBillDetailByNumber, getCurrentSystemConfig } from '@/api/api'
 import { getMpListShort, changeListFmtMinus, handleIntroJs } from '@/utils/util'
 import JUpload from '@/components/jeecg/JUpload'
+import JImageUpload from '@/components/jeecg/JImageUpload.vue'
 import JDate from '@/components/jeecg/JDate'
 import Vue from 'vue'
 // import QrcodeVue from 'qrcode.vue'
@@ -363,6 +378,7 @@ export default {
     WorkflowIframe,
     BillPrintIframe,
     JUpload,
+    JImageUpload,
     JDate,
     // QrcodeVue,
     VNodes: {
@@ -383,6 +399,7 @@ export default {
       operTimeStr: '',
       prefixNo: 'CGDD',
       fileList: [],
+      imageList: [],
       rowCanEdit: true,
       //以销定购的场景开关
       purchaseBySaleFlag: false,
@@ -420,7 +437,7 @@ export default {
           { 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: 'unitName', width: '6%', type: FormTypes.normal },
 
           { title: '型号', key: 'model', width: '9%', type: FormTypes.normal },
           { title: '颜色', key: 'color', width: '5%', type: FormTypes.normal },
@@ -517,6 +534,7 @@ export default {
       if (this.action === 'add') {
         this.addInit(this.prefixNo)
         this.fileList = []
+        this.imageList = []
         this.$nextTick(() => {
           handleIntroJs(this.prefixNo, 1)
         })
@@ -535,6 +553,8 @@ export default {
           this.manyAccountBtnStatus = false
         }
         this.fileList = this.model.fileName
+        this.imageList = this.model.voucherPicture
+
         this.$nextTick(() => {
           this.form.setFieldsValue(
             pick(
@@ -598,6 +618,11 @@ export default {
       } else {
         billMain.fileName = ''
       }
+      if (this.imageList && this.imageList.length > 0) {
+        billMain.voucherPicture = this.imageList
+      } else {
+        billMain.voucherPicture = ''
+      }
       if (this.model.id) {
         billMain.id = this.model.id
       }

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

@@ -382,10 +382,10 @@ export default {
             multi: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '名称', key: 'name', width: '10%', type: FormTypes.normal },
+          { title: '名称', key: 'name', width: '9%', type: FormTypes.normal },
           { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
 
-          { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal },
+          { title: '生产日期', key: 'productionDate', width: '6%', 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 },

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

@@ -474,7 +474,7 @@ export default {
           { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal },
           { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           { title: '商品条码', key: 'barCode', width: '6%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotName', width: '6%', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '6%', type: FormTypes.select, disabled: true },
           { title: '仓库货架', key: 'position', width: '6%', type: FormTypes.normal },
           { title: '包装规格', key: 'unitName', width: '6%', type: FormTypes.normal },
 

+ 43 - 13
jshERP-web/src/views/stock/CheckList.vue

@@ -4,13 +4,16 @@
       <a-card :bordered="false">
         <!-- 查询区域 -->
         <filter-form
-          @search="getList"
+          @search="onSearch"
+          @reset="onReset"
           :queryParam="queryParam"
           :spinnerList="spinnerList"
           :deoptData="deoptData"
         ></filter-form>
         <div style="margin-bottom: 6px">
-          <a-button type="primary" icon="plus" @click="addTask('add')">开始盘点</a-button>
+          <a-button :disabled="!selectedRowKeys.length" type="primary" icon="plus" @click="onStartTask"
+            >开始盘点</a-button
+          >
 
           <!-- <a-popconfirm style="margin: 0 6px" title="确定取消选中的盘点任务吗?" @confirm="() => cancelTask()">
             <a-button :disabled="!selectedRowKeys.length">取消盘点</a-button>
@@ -30,7 +33,11 @@
           :pagination="ipagination"
           :scroll="scroll"
           :loading="loading"
-          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+          :rowSelection="{
+            selectedRowKeys: selectedRowKeys,
+            onChange: onSelectChange,
+            getCheckboxProps: getCheckboxProps,
+          }"
           @change="handleTableChange"
         >
           <template slot="taskType" slot-scope="value">
@@ -42,10 +49,10 @@
           <span slot="action" slot-scope="text, record">
             <a @click="addTask('detail', record)">查看</a>
             <a-divider type="vertical" />
-            <a @click="addTask('edit', record)">编辑</a>
+            <a :disabled="record.taskStatus !== 1" @click="addTask('edit', record)">编辑</a>
             <a-divider type="vertical" />
             <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-              <a>删除</a>
+              <a :disabled="record.taskStatus !== 1 || record.taskStatus !== 4">删除</a>
             </a-popconfirm>
           </span>
         </a-table>
@@ -117,6 +124,7 @@ export default {
         detailByItemList: '/stocktaking/detailByItemList',
         delete: '/stocktaking/taskDelete/',
         cancel: '/stocktaking/taskCancel/',
+        startTask: '/stocktaking/startTask/',
       },
       stockVisible: false,
       title: '',
@@ -187,18 +195,40 @@ export default {
     handleDelete(id) {
       const ids = id || this.selectedRowKeys
       const url = this.url.delete + ids
-      getAction(url).then((res) => {
-        this.$message.success('删除成功')
-        this.getList()
-      })
+      getAction(url)
+        .then((res) => {
+          this.$message.success('删除成功')
+          this.getList()
+        })
+        .catch((err) => {
+          this.$message.error('删除失败')
+        })
     },
     cancelTask() {
       const ids = this.selectedRowKeys
       const url = this.url.cancel + ids
-      getAction(url).then((res) => {
-        this.$message.success('取消成功')
-        this.getList()
-      })
+      getAction(url)
+        .then((res) => {
+          this.$message.success('取消成功')
+          this.getList()
+        })
+        .catch((err) => {
+          this.$message.error('取消失败')
+        })
+    },
+    //开始盘点
+    onStartTask() {
+      const ids = this.selectedRowKeys
+      const url = this.url.startTask + ids
+      getAction(url)
+        .then((res) => {
+          this.$message.success('盘点成功')
+          this.getList()
+          this.$refs.table.clearSelection()
+        })
+        .catch((err) => {
+          this.$message.error('盘点失败')
+        })
     },
   },
 }

+ 35 - 13
jshERP-web/src/views/stock/TaskList.vue

@@ -12,10 +12,19 @@
         <div style="margin-bottom: 6px">
           <a-button type="primary" icon="plus" @click="addTask('add')">新增盘点任务</a-button>
 
-          <a-popconfirm style="margin: 0 6px" title="确定取消选中的盘点任务吗?" @confirm="() => cancelTask()">
+          <a-popconfirm
+            :disabled="!selectedRowKeys.length"
+            style="margin: 0 6px"
+            title="确定取消选中的盘点任务吗?"
+            @confirm="() => cancelTask()"
+          >
             <a-button :disabled="!selectedRowKeys.length">取消盘点</a-button>
           </a-popconfirm>
-          <a-popconfirm title="确定删除选中的盘点任务吗?" @confirm="() => handleDelete()">
+          <a-popconfirm
+            :disabled="!selectedRowKeys.length"
+            title="确定删除选中的盘点任务吗?"
+            @confirm="() => handleDelete()"
+          >
             <a-button :disabled="!selectedRowKeys.length">批量删除</a-button>
           </a-popconfirm>
           <!-- <a-button style="margin-left: 6px">导出任务</a-button> -->
@@ -30,7 +39,11 @@
           :pagination="ipagination"
           :scroll="scroll"
           :loading="loading"
-          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+          :rowSelection="{
+            selectedRowKeys: selectedRowKeys,
+            onChange: onSelectChange,
+            getCheckboxProps: getTaskkboxProps,
+          }"
           @change="handleTableChange"
         >
           <template slot="taskType" slot-scope="value">
@@ -42,10 +55,10 @@
           <span slot="action" slot-scope="text, record">
             <a @click="addTask('detail', record)">查看</a>
             <a-divider type="vertical" />
-            <a @click="addTask('edit', record)">编辑</a>
+            <a :disabled="record.taskStatus !== 1" @click="addTask('edit', record)">编辑</a>
             <a-divider type="vertical" />
             <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-              <a>删除</a>
+              <a :disabled="record.taskStatus !== 1 || record.taskStatus !== 4">删除</a>
             </a-popconfirm>
           </span>
         </a-table>
@@ -132,6 +145,7 @@ export default {
       }
     },
   },
+
   created() {
     this.getList()
     this.getSpinnerList(), this.getDepotList()
@@ -186,18 +200,26 @@ export default {
     handleDelete(id) {
       const ids = id || this.selectedRowKeys
       const url = this.url.delete + ids
-      getAction(url).then((res) => {
-        this.$message.success('删除成功')
-        this.getList()
-      })
+      getAction(url)
+        .then((res) => {
+          this.$message.success('删除成功')
+          this.getList()
+        })
+        .catch((err) => {
+          this.$message.error('删除失败')
+        })
     },
     cancelTask() {
       const ids = this.selectedRowKeys
       const url = this.url.cancel + ids
-      getAction(url).then((res) => {
-        this.$message.success('取消成功')
-        this.getList()
-      })
+      getAction(url)
+        .then((res) => {
+          this.$message.success('取消成功')
+          this.getList()
+        })
+        .catch((err) => {
+          this.$message.error('取消失败')
+        })
     },
   },
 }

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

@@ -1,7 +1,7 @@
 <template>
   <div class="table-page-search-wrapper">
     <!-- 搜索区域 -->
-    <a-form layout="inline" @keyup.enter.native="searchQuery">
+    <a-form layout="inline" :form="queryParam" ref="form" @keyup.enter.native="searchQuery">
       <a-row :gutter="24">
         <a-col :md="6" :sm="24">
           <a-form-item label="盘点状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -16,13 +16,13 @@
         </a-col>
         <a-col :md="6" :sm="24">
           <a-form-item label="盘点仓库" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择盘点仓库" showSearch :options="spinnerList" v-model="queryParam.depotId">
+            <a-select placeholder="请选择盘点仓库" showSearch :options="deoptData" v-model="queryParam.depotId">
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :md="6" :sm="24">
           <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择创建人" showSearch :options="deoptData" v-model="queryParam.createBy">
+            <a-select placeholder="请选择创建人" showSearch :options="spinnerList" v-model="queryParam.createBy">
             </a-select>
           </a-form-item>
         </a-col>
@@ -42,8 +42,8 @@
         </a-col> -->
         <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
           <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="searchQuery">查询</a-button>
-            <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+            <a-button type="primary" @click="onSearch">查询</a-button>
+            <a-button style="margin-left: 8px" @click="onReset">重置</a-button>
           </a-col>
         </span>
       </a-row>
@@ -86,11 +86,11 @@ export default {
     }
   },
   methods: {
-    searchQuery() {
-      this.$emit('search', 'search')
+    onSearch() {
+      this.$emit('search')
     },
-    searchReset() {
-      this.$emit('search', 'reset')
+    onReset() {
+      this.$emit('reset')
     },
   },
 }

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

@@ -56,8 +56,8 @@
                 </a-col>
                 <span>
                   <a-col :md="6" :sm="24">
-                    <a-button type="primary" @click="getList">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="getList">重置</a-button>
+                    <a-button type="primary" @click="onSearch">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="onReset">重置</a-button>
                   </a-col>
                 </span>
               </a-row>
@@ -95,8 +95,8 @@
       </a-spin>
       <template slot="footer">
         <a-button @click="handleCancel">取消</a-button>
-        <a-button v-if="isShowBtn" @click="handleCancel">完成盘点</a-button>
-        <a-button v-if="isShowBtn" @click="handleOk" type="primary">确认更新盘点数据</a-button>
+        <a-button v-if="isShowBtn" @click="handleOk">完成盘点</a-button>
+        <a-button v-if="isShowBtn" @click="handleUpdate" type="primary">确定更新盘点数据</a-button>
       </template>
     </a-modal>
     <j-select-material-modal
@@ -139,6 +139,8 @@ import JSelectMaterialModal from '../../../components/jeecgbiz/modal/JSelectMate
 import { getAction, postAction } from '@/api/manage'
 import { getMaterialByBatchNumber } from '@/api/api'
 import { newTableMixin } from '@/mixins/newTableMixin'
+import { Modal } from 'ant-design-vue'
+
 // import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 // import { Form } from 'ant-design-vue'
 // const useForm = Form.useForm
@@ -191,6 +193,9 @@ export default {
         add: '/stocktaking/add',
         update: '/stocktaking/detailUpdate',
         edit: '/stocktaking/itemUpdate',
+        updateStock: '/stocktaking/taskUpdateStock/',
+        taskCom: '	/stocktaking/taskComplete/',
+        detail: '/stocktaking/detail/',
       },
       form: {},
       isShow: false,
@@ -245,7 +250,12 @@ export default {
   },
   computed: {
     isShowBtn() {
-      return this.openType !== 'detail' || this.form.taskStatus !== 1
+      console.log('==================', this.form.taskStatus)
+
+      if (this.openType === 'detail') return false
+      if (this.form.taskStatus !== 1) return false
+
+      return true
     },
   },
   methods: {
@@ -275,27 +285,44 @@ export default {
     handleCancel() {
       this.$emit('update:stockVisible', false)
     },
-    handleOk() {
-      this.$refs.editForm.form.validateFields((err, values) => {
-        if (!err) {
-          const params = { ...values }
-          if (params.taskType === 2) {
-            params.materialExtendIdList = this.dataSource.map((item) => item.batchNumber)
-          }
-          const url = this.openType === 'add' ? this.url.add : this.url.update
-          postAction(url, params).then((res) => {
-            this.$message.success('操作成功')
-            this.handleCancel()
-          })
-        }
+    //更新盘点数据
+    handleUpdate() {
+      let that = this
+      const url = this.url.updateStock + this.taskId
+
+      Modal.confirm({
+        title: '是否确定更新盘点数据,确定后商品库存将按照当前的盘点数据进行更新',
+        onOk() {
+          getAction(url)
+            .then((res) => {
+              that.$message.success('操作成功')
+              that.handleCancel()
+            })
+            .catch((err) => {
+              this.$message.error('操作失败')
+            })
+        },
+        onCancel() {
+          console.log('Cancel')
+        },
       })
     },
+    handleOk() {
+      getAction(this.url.taskCom + this.taskId)
+        .then((res) => {
+          this.$message.success('操作成功')
+        })
+        .catch((err) => {
+          this.$message.error('操作失败')
+        })
+      this.handleCancel()
+    },
     onChangeGoods() {
       this.$refs.selectModal.queryParam.depotId = this.form.depotId
       this.$refs.selectModal.showModal()
     },
     getDetailList(id) {
-      const url = '/stocktaking/detail/' + id
+      const url = this.url.detail + id
       const form = this.$refs['editForm'].form
 
       getAction(url).then((res) => {
@@ -332,6 +359,7 @@ export default {
     },
     getList(id) {
       const url2 = '/stocktaking/detailByItemList'
+      const form = this.$refs['editForm'].form
 
       const params = { ...this.queryParams, taskStocktakingId: id }
       const url = url2 + '?pageNum=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize

+ 0 - 7
jshERP-web/src/views/stock/components/editForm.vue

@@ -158,13 +158,6 @@ export default {
     }
   },
   watch: {
-    model: {
-      handler(val) {
-        console.log('=====================222', this.form.getFieldsValue())
-      },
-      deep: true,
-      immediate: true,
-    },
     total(val) {
       this.form.setFieldsValue({ materialCount: val })
     },

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

@@ -27,9 +27,9 @@
             rowKey="id"
             :columns="columns"
             :dataSource="dataSource"
-            :components="handleDrag(columns)"
-            :pagination="ipagination"
             :loading="loading"
+            :scroll="{ y: 500 }"
+            :pagination="false"
             @change="handleTableChange"
           >
             <span v-if="form.taskType === 2" slot="action" slot-scope="text, record">
@@ -129,7 +129,7 @@ export default {
       if (val) {
         if (this.taskId) {
           this.$nextTick(() => {
-            this.getDetailList(this.taskId)
+            this.getList(this.taskId)
           })
 
           return
@@ -143,7 +143,11 @@ export default {
   },
   computed: {
     isShowBtn() {
-      return this.openType !== 'detail' || this.form.taskStatus !== 1
+      if (this.openType === 'add') return true
+
+      if (this.openType === 'detail') return false
+      if (this.form.taskStatus !== 1) return false
+      return true
     },
   },
   methods: {
@@ -169,7 +173,7 @@ export default {
       this.$refs.selectModal.queryParam.depotId = this.form.depotId
       this.$refs.selectModal.showModal()
     },
-    getDetailList(id) {
+    getList(id) {
       const url = '/stocktaking/detail/' + id
       const url2 = '/stocktaking/detailByItemList'
       const form = this.$refs['editForm'].form

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

@@ -82,7 +82,7 @@ const table = {
     { dataIndex: 'position', title: '仓库货架' },
   ],
   checkGoodsColumns: [
-    { dataIndex: 'categoryName', title: '商品类别', scopedSlots: { customRender: 'categoryName' } },
+    { dataIndex: 'categoryName', title: '商品类别' },
     { dataIndex: 'name', title: '商品名称' },
     { dataIndex: 'systemSku', title: '系统SKU' },
     { dataIndex: 'batchNumber', title: '批次号' },