2
0

2 Incheckningar 9d0db4f9a2 ... 21349a8f3f

Upphovsman SHA1 Meddelande Datum
  廖泽勇 21349a8f3f Merge branch 'dev_ml_423' of http://121.40.253.172:3000/pengyue/jsh_erp into test 1 vecka sedan
  maliang a1b7694098 fix:修改 1 vecka sedan

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

@@ -482,7 +482,7 @@ export const BillModalMixin = {
         target.setValues([
           {
             rowKey: row.id,
-            values: { position:position,inventory: stock },
+            values: { position:position,inventory: stock,stock: stock },
           },
         ])
         target.$forceUpdate()

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

@@ -12,7 +12,6 @@
           :total="dataSource.length || 0"
           openType="detail"
           :stockType="stockType"
-          @changeForm="handleChangeForm"
         ></edit-form>
         <a-divider />
         <div>
@@ -74,14 +73,6 @@
             :loading="loading"
             @change="handleTableChange"
           >
-            <!-- <template v-for="col in colList" :slot="col" slot-scope="text, record">
-              <div :key="col">
-                <a-input v-if="editableData[record.id]" v-model="editableData[record.id][col]" style="margin: -5px 0" />
-                <template v-else>
-                  {{ col }}
-                </template>
-              </div>
-            </template> -->
             <span slot="action" v-if="openType !== 'detail'" slot-scope="text, record">
               <a type="text" @click="handleEdit(record)">编辑</a>
             </span>
@@ -97,13 +88,6 @@
         <a-button v-if="isShowBtn" @click="handleUpdate" type="primary">确定更新盘点数据</a-button>
       </template>
     </a-modal>
-    <j-select-material-modal
-      @ok="getGoods"
-      @all="findAllSelect"
-      ref="selectModal"
-      :multi="true"
-      :isStock="true"
-    ></j-select-material-modal>
     <a-modal @cancel="editVisible = false" @ok="onSubmitGoods" :visible="editVisible" title="编辑" width="50%">
       <a-form-model :model="editForm" :rules="editFormRules" ref="editFormModel">
         <a-form-model-item label="盘点任务名称" :labelCol="{ span: 4 }" :wrapperCol="{ span: 14 }" prop="name">
@@ -283,7 +267,7 @@ export default {
   methods: {
     handleEdit(data) {
       console.log('handleEdit=====',data)
-      this.editForm = { ...data }
+      this.editForm = { ...data,name:this.form.taskName }
       this.editVisible = true
       this.handleChangeNewInventory(data.inventory)
     },
@@ -293,6 +277,7 @@ export default {
           postAction(this.url.edit, this.editForm).then((res) => {
             this.$message.success('操作成功')
             this.editVisible = false
+            this.getList(this.taskId)
           })
         } else {
           return false
@@ -347,10 +332,6 @@ export default {
         })
       this.handleCancel()
     },
-    onChangeGoods() {
-      this.$refs.selectModal.queryParam.depotId = this.form.depotId
-      this.$refs.selectModal.showModal()
-    },
     getDetailList(id) {
       const url = this.url.detail + id
       const form = this.$refs['editForm'].form
@@ -406,59 +387,10 @@ export default {
         this.getForm(form.getFieldsValue())
       })
     },
-    getGoods(rows, ids) {
-      const str = ids
-        .split(',')
-        .filter((item) => item)
-        .join(',')
-      this.getBatchData(str)
-    },
-    findAllSelect() {
-      const params = { ...this.$refs.selectModal.queryParam }
-      getAction('/material/findBatchNumbersBySelect', params).then((res) => {
-        this.$refs.selectModal.close()
-        this.getBatchData(res.data)
-      })
-    },
-    getBatchData(val) {
-      const batchStr = val
-        .split(',')
-        .filter((item) => item)
-        .join(',')
-      const params = {
-        batchNumber: batchStr,
-        organId: '',
-        mpList: '',
-        prefixNo: '',
-      }
-      getMaterialByBatchNumber(params).then((res) => {
-        this.dataSource.push(...res.data)
-        this.dataSource = this.dataSource.reduce((acc, cur) => {
-          const hasDuplicate = acc.some((item) => item.batchNumber === cur.batchNumber)
-          if (!hasDuplicate) {
-            acc.push(cur)
-          }
-          return acc
-        }, [])
-      })
-    },
     getForm(val) {
       this.form = val
       this.$refs['editForm'].model = val
     },
-    //删除
-    handleDelete(record) {
-      this.dataSource = this.dataSource.filter((item) => item.batchNumber !== record.batchNumber)
-    },
-
-    handleChangeForm(val) {
-      this.dataSource = []
-      this.getForm(val)
-      if (val.taskType === 1) {
-        this.findAllSelect()
-      }
-    },
-
     handleChangeNewInventory(val) {
       console.log('1111111======',val)
       const inventory = this.editForm.inventory ? Number(this.editForm.inventory) : 0

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

@@ -71,17 +71,12 @@
           <a-input placeholder="请输入" disabled v-decorator.trim="['operTime']" />
         </a-form-item>
       </a-col>
-      <a-col v-show="true" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
           <a-select placeholder="请选择" v-decorator="['taskStatus']" :options="taskStatusList" :disabled="isDisabled">
           </a-select>
         </a-form-item>
       </a-col>
-      <a-col v-show="false" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
-        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
-          <a-input v-decorator="['id']"></a-input>
-        </a-form-item>
-      </a-col>
     </a-row>
   </a-form>
 </template>

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

@@ -15,7 +15,7 @@
           @changeForm="handleChangeForm"
         ></edit-form>
         <div>
-          <a-button v-if="form.taskType === 2" style="margin-bottom: 6px" type="primary" @click="onChangeGoods"
+          <a-button v-if="form.taskType === 2&&openType!='detail'" style="margin-bottom: 6px" type="primary" @click="onChangeGoods"
             >选择商品</a-button
           >
           <a-table
@@ -187,7 +187,7 @@ export default {
     },
     getList(id) {
       const url = '/stocktaking/detail/' + id
-      const url2 = '/stocktaking/detailByItemList'
+      const url2 = `/stocktaking/detailByItemList?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`
       const form = this.$refs['editForm'].form
 
       getAction(url).then((res) => {
@@ -297,6 +297,7 @@ export default {
     //删除
     handleDelete(record) {
       this.dataSource = this.dataSource.filter((item) => item.batchNumber !== record.batchNumber)
+      this.ipagination.total -=1
     },
 
     handleChangeForm(val) {