Kaynağa Gözat

物资管理-入库、库存修改

wangqiang 2 yıl önce
ebeveyn
işleme
e033eb98d3

+ 105 - 283
src/views/modules/materialManagement/contract/ContractChooseForm.vue

@@ -1,90 +1,69 @@
 <template>
-  <div class="page">
-    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-      <!-- 搜索框-->
-      <el-form-item label="客户名称" prop="name">
-        <el-input size="small" v-model="searchForm.name" placeholder="请输入客户名称" clearable></el-input>
-      </el-form-item>
-      <el-form-item label="合同名称" prop="contractName">
-        <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
-          <el-option
-            v-for="item in $dictUtils.getDictList('cw_status')"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="合同生效日期" prop="effectiveDates">
-        <el-date-picker
-          placement="bottom-start"
-          format="yyyy-MM-dd HH:mm:ss"
-          value-format="yyyy-MM-dd HH:mm:ss"
-          v-model="searchForm.effectiveDates"
-          type="datetimerange"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期">
-        </el-date-picker>
-      </el-form-item>
+  <div>
+    <el-dialog
+      title="选择合同信息"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      @keyup.enter.native=""
+      :visible.sync="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="合同名称" prop="contractName">
+            <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="合同生效日期" prop="effectiveDates">
+            <el-date-picker
+              placement="bottom-start"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              v-model="searchForm.effectiveDates"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
 
-      <el-form-item>
-        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
-        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
-      </el-form-item>
-    </el-form>
-    <div class="bg-white top" style="">
-      <vxe-toolbar :refresh="{query: refreshList}" custom>
-        <template #buttons>
-          <el-button v-if="hasPermission('contract:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
-        </template>
-      </vxe-toolbar>
-      <div style="height: calc(100% - 90px)">
         <vxe-table
-          :key="tableKey"
           border="inner"
           auto-resize
           resizable
-          height="auto"
+          height="400px"
           :loading="loading"
           size="small"
-          ref="clientTable"
+          ref="projectTable"
           show-header-overflow
           show-overflow
           highlight-hover-row
           :menu-config="{}"
-          @sort-change="sortChangeHandle"
+          :print-config="{}"
+          @sort-change=""
           :sort-config="{remote:true}"
           :data="dataList"
-          :checkbox-config="{}">
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="40px"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同编号" field="contractNo"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
           <vxe-column min-width="160" align="center" title="客户名称" field="name"></vxe-column>
           <vxe-column min-width="160" align="center" title="统一社会信用代码" field="uscCode"></vxe-column>
           <vxe-column min-width="160" align="center" title="详细地址" field="address"></vxe-column>
-          <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
           <vxe-column min-width="160" align="center" title="合同生效日期" field="effectiveDate"></vxe-column>
           <vxe-column min-width="160" align="center" title="合同终止日期" field="endTime"></vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
-            <template slot-scope="scope">
-              <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
-                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
-                {{$dictUtils.getDictLabel("cw_status", scope.row.status, '-')}}
-              </el-button>
-            </template>
-          </vxe-column>
 
-          <vxe-column title="操作" width="150px" fixed="right" align="center">
-            <template  slot-scope="scope">
-              <el-button v-if="hasPermission('contract:edit')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"  size="small" @click="push(scope.row)">修改</el-button>
-              <el-button v-else-if="hasPermission('contract:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
-              <el-button v-if="hasPermission('contract:edit')&&scope.row.createBy === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('contract:del')&&scope.row.createBy === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
-              <el-button v-else-if="hasPermission('contract:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
-            </template>
-          </vxe-column>
         </vxe-table>
         <vxe-pager
           background
@@ -96,115 +75,73 @@
           :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
           @page-change="currentChangeHandle">
         </vxe-pager>
-        <UpdateInfoForm ref="updateInfoForm" @refreshList="refreshList"></UpdateInfoForm>
       </div>
-    </div>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-  import UserSelect from '@/components/userSelect'
-  import UpdateInfoForm from '../info/UpdateInfoForm'
-  import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
-  import SelectTree from '@/components/treeSelect/treeSelect.vue'
-  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
-  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import InputNumber from '@/views/modules/sys/workContract/InputNumber.vue'
+  // import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  // import WareHouseService from '@/api/materialManagement/WareHouseService'
   import ContractService from '@/api/materialManagement/ContractService'
-  import TaskService from '@/api/flowable/TaskService'
-  import ProcessService from '@/api/flowable/ProcessService'
-  import pick from 'lodash.pick'
-  import UserService from '@/api/sys/UserService'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   export default {
     data () {
       return {
-        num: 0,
-        searchForm: {
-          contractName: '',
-          name: '',
-          handledBy: '',
-          handledByOffice: '',
-          status: '',
-          effectiveDates: [],
-          procurementType: '',
-          createBy: ''
-        },
-        dataList: [],
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
         tablePage: {
           total: 0,
           currentPage: 1,
           pageSize: 10,
           orders: []
         },
-        tableKey: '',
-        loading: false,
-        processDefinitionAuditId: '',
-        procDefAuditKey: '',
-        isAdmin: false,
-        create: ''
+        dataList: [],
+        searchForm: {
+          contractName: '',
+          status: '',
+          effectiveDates: []
+        }
       }
     },
-    workClientService: null,
-    materialManagementService: null,
+    // projectRecordsService: null,
+    // wareHouseService: null,
     contractService: null,
-    taskService: null,
-    processService: null,
-    userService: null,
     created () {
-      this.workClientService = new WorkClientService()
-      this.materialManagementService = new MaterialManagementService()
+      // this.projectRecordsService = new ProjectRecordsService()
+      // this.wareHouseService = new WareHouseService()
       this.contractService = new ContractService()
-      this.taskService = new TaskService()
-      this.processService = new ProcessService()
-      this.userService = new UserService()
     },
     components: {
-      InputNumber,
       SelectUserTree,
-      SelectTree,
-      UpdateInfoForm,
-      UserSelect
-    },
-    computed: {
-      userName () {
-        return JSON.parse(localStorage.getItem('user')).name
-      },
-      user () {
-        this.createName = JSON.parse(localStorage.getItem('user')).name
-        return JSON.parse(localStorage.getItem('user'))
-      }
-    },
-    mounted () {
-      this.refreshList()
-    },
-    activated () {
-      this.refreshList()
+      InputNumber
     },
     methods: {
-      // 新增
-      add () {
-        // this.$refs.reportManagementForm.init('add', '')
-      },
-      // 修改
-      edit (id) {
-        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
-          return item.id
-        })[0]
-        this.$refs.updateInfoForm.init('edit', id)
-      },
-      // 查看
-      view (id) {
-        this.$refs.updateInfoForm.init('view', id)
+      init () {
+        this.visible = true
+        this.list()
       },
-      // 查询当前用户是否是管理员用户
-      checkIsAdmin () {
-        this.userService.is().then(({data}) => {
-          this.isAdmin = data
-        })
+      // 表单提交
+      getProject () {
+        let row = this.$refs.projectTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getProject', row)
       },
-      // 获取数据列表
-      refreshList () {
+      list () {
         this.loading = true
+        // this.searchForm.createId = this.$store.state.user.id
+        this.searchForm.status = '5'
         this.contractService.list({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
@@ -216,152 +153,37 @@
           this.tableKey = Math.random()
           this.loading = false
         })
-        this.checkIsAdmin()
-        this.processService.getByName('物资管理-合同').then(({data}) => {
-          if (!this.commonJS.isEmpty(data.id)) {
-            this.processDefinitionAuditId = data.id
-            this.procDefAuditKey = data.key
-          }
-        })
+        // this.projectRecordsService.list({
+        //   'current': this.tablePage.currentPage,
+        //   'size': this.tablePage.pageSize,
+        //   'orders': this.tablePage.orders,
+        //   ...this.searchForm
+        // }).then(({data}) => {
+        //   this.dataList = data.records
+        //   this.tablePage.total = data.total
+        //   this.loading = false
+        // })
       },
       // 当前页
-      currentChangeHandle ({ currentPage, pageSize }) {
+      currentChangeHandle ({currentPage, pageSize}) {
         this.tablePage.currentPage = currentPage
         this.tablePage.pageSize = pageSize
-        this.refreshList()
-      },
-      // 排序
-      sortChangeHandle (column) {
-        this.tablePage.orders = []
-        if (column.order != null) {
-          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
-        }
-        this.refreshList()
-      },
-      // 删除
-      del (id) {
-        let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
-          return item.id
-        }).join(',')
-        this.$confirm(`确定删除所选项吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.loading = true
-          this.contractService.remove(ids).then(({data}) => {
-            this.$message.success(data)
-            this.refreshList()
-            this.loading = false
-          })
-        })
+        this.list()
       },
       resetSearch () {
         this.$refs.searchForm.resetFields()
-        this.refreshList()
-      },
-      start () {
-        // 读取流程表单
-        let tabTitle = `发起流程【物资管理-合同申请】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [物资管理-合同申请]`
-        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
-          status: 'startAndHold'}).then((data) => {
-            this.$router.push({
-              path: '/flowable/task/TaskForm',
-              query: {
-                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-                procDefId: this.processDefinitionAuditId,
-                procDefKey: this.procDefAuditKey,
-                status: 'startAndHold',
-                title: tabTitle,
-                formType: data.data.formType,
-                formUrl: data.data.formUrl,
-                formTitle: processTitle,
-                businessId: 'false',
-                isShow: false,
-                routePath: '/materialManagement/contract/ContractList'
-              }
-            })
-          })
+        this.list()
       },
-      // 发起物资管理-合同申请
-      push (row) {
-        // 读取流程表单
-        let title = `发起流程【物资管理-合同申请】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[物资管理-合同申请]`
-        let status = 'startAndHold'
-        if (row.status === '3') {
-          status = 'startAndClose'
-        } else if (row.status === '4') {
-          status = 'reapplyFlag'
-        }
-        this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
-          businessId: row.id,
-          businessTable: 'material_management_pruchase_request_basics'}).then((data) => {
-            this.$router.push({
-              path: '/flowable/task/TaskForm',
-              query: {
-                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-                procDefId: this.processDefinitionAuditId,
-                procDefKey: this.procDefAuditKey,
-                title: title,
-                formType: data.data.formType,
-                formUrl: data.data.formUrl,
-                formTitle: processTitle,
-                businessTable: 'material_management_pruchase_request_basics',
-                businessId: row.id,
-                isShow: 'false',
-                status: status,
-                routePath: '/materialManagement/contract/ContractList'
-              }
-            })
-          })
-      },
-      // 查看客户登记流程结果
-      detail (row) {
-        if (row.status !== '0' && row.status !== '1') {
-          // eslint-disable-next-line eqeqeq
-          this.taskService.getTaskDef({
-            procInsId: row.procInsId,
-            procDefId: this.processDefinitionAuditId
-          }).then(({data}) => {
-            this.$router.push({
-              path: '/flowable/task/TaskFormDetail',
-              query: {
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-                isShow: 'false',
-                readOnly: true,
-                title: '质控管理' + '流程详情',
-                formTitle: '质控管理' + '流程详情',
-                businessId: row.id,
-                status: 'reback'
-              }
-            })
-          })
-        }
-      },
-      // 撤回报告流程
-      reback (row) {
-        this.$confirm(`确定要撤回该申请吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(async () => {
-          await this.contractService.findById(row.id).then(({data}) => {
-            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
-              this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.refreshList()
-            } else {
-              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-                let form = {status: '3', id: row.id}
-                this.contractService.updateStatusById(form)
-                this.$message.success(data)
-                this.refreshList()
-              })
-            }
-          })
-        })
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
       }
     }
   }
 </script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 8 - 1
src/views/modules/materialManagement/contract/ContractList.vue

@@ -61,10 +61,17 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同编号" field="contractNo"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同名称" field="contractName">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('material:list')" @click="view(scope.row.id)">{{scope.row.contractName}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('material:list')"  @click="view(scope.row.id,)">{{scope.row.contractName}}</el-link>
+              <span v-else>{{scope.row.contractName}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160" align="center" title="客户名称" field="name"></vxe-column>
           <vxe-column min-width="160" align="center" title="统一社会信用代码" field="uscCode"></vxe-column>
           <vxe-column min-width="160" align="center" title="详细地址" field="address"></vxe-column>
-          <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
           <vxe-column min-width="160" align="center" title="合同生效日期" field="effectiveDate"></vxe-column>
           <vxe-column min-width="160" align="center" title="合同终止日期" field="endTime"></vxe-column>
           <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >

+ 6 - 4
src/views/modules/materialManagement/contract/UpdateContractInfoForm.vue

@@ -10,7 +10,7 @@
       :visible.sync="visible"
       append-to-body
     >
-    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
              label-width="200px" @submit.native.prevent>
 
       <el-divider content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
@@ -171,12 +171,12 @@
         <el-tab-pane label="客户联系人" name="contact">
           <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户联系人</span>
           <el-row :gutter="15">
-            <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('contact')">
+            <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'" @click="insertEvent('contact')">
               新增客户联系人
             </el-button>
           </el-row>
           <el-row  :gutter="15">
-            <el-form :disabled="status === 'audit' || status === 'taskFormDetail'">
+            <el-form :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'">
               <vxe-table
                 border
                 show-overflow
@@ -400,7 +400,9 @@
         if (method === 'add') {
           this.title = `新建采购类型`
         } else if (method === 'edit') {
-          this.title = '修改采购类型'
+          this.title = '修改合同信息'
+        } else if (method === 'view') {
+          this.title = '查看合同信息'
         }
         this.inputForm.id = id
         this.visible = true

+ 28 - 11
src/views/modules/materialManagement/wareHouse/WareHouseAddForm.vue

@@ -59,14 +59,14 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-<!--          <el-col :span="12">-->
-<!--            <el-form-item label="合同编号" prop="contractNo"-->
-<!--                          :rules="[{required: true, message:'请选择物资合同编号', trigger:'blur'}]">-->
-<!--              <el-input size="medium" :readonly="true" @focus="openContractChooseForm()" v-model="inputForm.contractNo" placeholder="请选择采购编号">-->
-<!--                <el-button slot="append" icon="el-icon-search" @click="openContractChooseForm()"></el-button>-->
-<!--              </el-input>-->
-<!--            </el-form-item>-->
-<!--          </el-col>-->
+          <el-col :span="12">
+            <el-form-item label="合同编号" prop="contractNo"
+                          :rules="[]">
+              <el-input size="medium" :readonly="true" @focus="openContractChooseForm()" v-model="inputForm.contractNo" placeholder="请选择采购编号">
+                <el-button slot="append" icon="el-icon-search" @click="openContractChooseForm()"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="采购编号" prop="purchaseNo"
                           :rules="[]">
@@ -264,10 +264,11 @@
       <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
       <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
       <PurchaseChooseForm  ref="purchaseChooseForm" @getProject="getContract"></PurchaseChooseForm>
-<!--      <ContractChooseForm  ref="contractChooseForm" @getProject="getContract"></ContractChooseForm>-->
+<!--      合同选择-->
+      <ContractChooseForm  ref="contractChooseForm" @getProject="getContract3"></ContractChooseForm>
       <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+      <el-button size="small" type="primary" v-if="method !== 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
     </span>
     </el-dialog>
   </div>
@@ -473,6 +474,23 @@
         })
         this.$forceUpdate()
       },
+      getContract3 (row) {
+        console.log('row', row)
+        this.inputForm.contractNo = row.contractNo
+        // this.materialManagementService.findById(id).then(({data}) => {
+        //   this.inputForm.detailInfos = data.detailInfos
+        //   this.inputForm.purchaseNo = data.purchaseNo
+        //   let i = this.inputForm.detailInfos.length
+        //   for (let j = 0; j < i; j++) {
+        //     if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+        //       if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+        //         this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+        //       }
+        //     }
+        //   }
+        // })
+        this.$forceUpdate()
+      },
       openContractForm () {
         this.$refs.purchaseChooseForm.init()
       },
@@ -714,7 +732,6 @@
         })
       },
       close () {
-        this.method = ''
         this.inputForm.detailInfos = []
         this.inputForm.wareHouse = []
         this.inputForm.amountInfos = []

+ 31 - 0
src/views/modules/materialManagement/wareHouse/WareHouseUpdateForm.vue

@@ -51,6 +51,14 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo"
+                        :rules="[]">
+            <el-input size="medium" :readonly="true" @focus="openContractChooseForm()" v-model="inputForm.contractNo" placeholder="请选择采购编号">
+              <el-button slot="append" icon="el-icon-search" @click="openContractChooseForm()"></el-button>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
           <el-form-item label="采购编号" prop="purchaseNo"
                         :rules="[]">
             <el-input size="medium" :readonly="true" @focus="openContractForm()" v-model="inputForm.purchaseNo" placeholder="请选择采购编号">
@@ -239,6 +247,7 @@
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
     <CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
     <MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
+    <ContractChooseForm  ref="contractChooseForm" @getProject="getContract3"></ContractChooseForm>
     <UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
   </div>
 </template>
@@ -260,6 +269,7 @@
   import CwProgramPageForm from '@/views/modules/cw/reimbursementApproval/info/CwProgramPageForm'
   import MaterialTypePullForm from '../info/MaterialTypePullForm'
   import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
+  import ContractChooseForm from '../contract/ContractChooseForm'
   export default {
     data () {
       return {
@@ -342,6 +352,7 @@
       CwProgramPageForm,
       MaterialTypePullForm,
       UserPullForm,
+      ContractChooseForm,
       UpdateInfoForm
     },
     computed: {
@@ -851,6 +862,26 @@
             }
           }
         }
+      },
+      openContractChooseForm () {
+        this.$refs.contractChooseForm.init()
+      },
+      getContract3 (row) {
+        console.log('row', row)
+        this.inputForm.contractNo = row.contractNo
+        // this.materialManagementService.findById(id).then(({data}) => {
+        //   this.inputForm.detailInfos = data.detailInfos
+        //   this.inputForm.purchaseNo = data.purchaseNo
+        //   let i = this.inputForm.detailInfos.length
+        //   for (let j = 0; j < i; j++) {
+        //     if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
+        //       if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
+        //         this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
+        //       }
+        //     }
+        //   }
+        // })
+        this.$forceUpdate()
       }
     }
   }

+ 4 - 3
src/views/modules/materialManagement/wareHouseSummary/WareHouseHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-dialog
-      title="记录"
+      title="记录"
       :close-on-click-modal="false"
       v-dialogDrag
       width="1100px"
@@ -33,7 +33,7 @@
               :row-config="{isCurrent: true}"
               :radio-config="{trigger: 'row'}"
             >
-              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--              <vxe-column type="seq" width="60" title="序号"></vxe-column>-->
               <vxe-column min-width="160" align="center" title="入库编号" field="wareHouseNumber"></vxe-column>
               <vxe-column min-width="160" align="center" title="入库名称" field="wareHouseName">
                 <template slot-scope="scope">
@@ -81,7 +81,7 @@
               :row-config="{isCurrent: true}"
               :radio-config="{trigger: 'row'}"
             >
-              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+<!--              <vxe-column type="seq" width="60" title="序号"></vxe-column>-->
               <vxe-column min-width="160" align="center" title="领用编号" field="collectNo"></vxe-column>
               <vxe-column min-width="160" align="center" title="领用物品名称" field="goodsName">
                 <template slot-scope="scope">
@@ -182,6 +182,7 @@
           ...this.searchForm
         }).then(({data}) => {
           this.dataList = data.records
+          // this.collectList = data.collectList
           this.tablePage.total = data.total
           this.tableKey = Math.random()
           this.loading = false