Browse Source

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy

lilei 4 năm trước cách đây
mục cha
commit
a173e3c007

+ 6 - 17
src/views/allocationManagement/warehouseAllocation/basicInfoModal.vue

@@ -4,7 +4,7 @@
     class="warehouseAllocation-basicInfo-modal"
     :footer="null"
     :maskClosable="false"
-    title="新增散件入库单"
+    title="新增"
     v-model="isShow"
     @cancle="isShow = false"
     width="80%">
@@ -14,28 +14,17 @@
       :model="form"
       :rules="rules"
       :label-col="formItemLayout.labelCol"
-      :wrapper-col="formItemLayout.wrapperCol"
-    >
+      :wrapper-col="formItemLayout.wrapperCol" >
       <a-form-model-item required label="调出仓库" prop="outWarehouseSn">
-        <a-select
-          id="warehouseAllocation-basicInfo-outWarehouseSn"
-          allowClear
-          placeholder="请选择调出仓库"
-          v-model="form.outWarehouseSn"
-        >
-          <a-select-option v-for="item in warehouseList" :value="item.warehouseSn">
+        <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="form.outWarehouseSn" >
+          <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
             {{ item.name }}
           </a-select-option>
         </a-select>
       </a-form-model-item>
       <a-form-model-item required label="调入仓库" prop="putWarehouseSn">
-        <a-select
-          id="warehouseAllocation-basicInfo-putWarehouseSn"
-          allowClear
-          placeholder="请选择调入仓库"
-          v-model="form.putWarehouseSn"
-        >
-          <a-select-option v-for="item in warehouseList" :value="item.warehouseSn">
+        <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="form.putWarehouseSn" >
+          <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">
             {{ item.name }}
           </a-select-option>
         </a-select>

+ 8 - 29
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -4,6 +4,9 @@
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
         <a id="warehouseAllocationEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <span style="margin: 0 15px;color: #666;">调出仓库:{{ (warehouse&&warehouse.outWarehouseName) || '--' }}</span>
+        <span style="margin: 0 15px;color: #666;">调入仓库:{{ (warehouse&&warehouse.putWarehouseName) || '--' }}</span>
+        <!-- <a-button id="warehouseAllocationEdit-edit-btn" size="small" @click="handleEditInfo" style="margin-left:10px" key="0">编辑</a-button> -->
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
@@ -11,23 +14,6 @@
         <a-button key="1" type="primary" id="warehouseAllocationEdit-print-btn">快速打印</a-button>
       </template>
     </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            基础信息
-            <!-- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="warehouseAllocationEdit-circle-btn" @click.stop="handleEditInfo" /> -->
-          </template>
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调出仓库">{{ warehouse?warehouse.outWarehouseName:'' }}
-            </a-descriptions-item>
-            <a-descriptions-item label="调入仓库">{{ warehouse?warehouse.putWarehouseName:'' }}
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
     <!-- 选择产品 -->
     <a-card size="small" :bordered="false" class="warehouseAllocationEdit-cont">
       <a-collapse :activeKey="['1']">
@@ -327,7 +313,6 @@ export default {
   components: { STable, VSelect, basicInfoModal },
   data () {
     return {
-      id: this.$route.params.id, // 单据id
       typeName: [], // 分类
       queryParam: {
         outWarehouseSn: '', // 调出仓库sn
@@ -455,9 +440,7 @@ export default {
     },
     // 获取仓库仓位
     getWarehouseLoc (sn, type) {
-      warehouseLocAllList({
-        warehouseSn: sn
-      }).then(res => {
+      warehouseLocAllList({ warehouseSn: sn }).then(res => {
         if (type == 'put') {
           this.warehousePutLocData = res.data || []
         } else {
@@ -467,9 +450,7 @@ export default {
     },
     // 查询基础信息
     getHouse () {
-      allocWarehouseFind({
-        id: this.id
-      }).then(res => {
+      allocWarehouseFind({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           this.warehouse = res.data
           this.queryParam.outWarehouseSn = res.data.outWarehouseSn
@@ -483,7 +464,6 @@ export default {
     },
     // 产品查询
     getProductList (pagination) {
-      console.log(pagination, 'pagination-------')
       this.disabled = true
       this.loading = true
       this.pageNo = pagination && pagination.current ? pagination.current : this.pageNo
@@ -536,10 +516,9 @@ export default {
         return this.$message.error('请输入调出数量!')
       }
       row.addLoading = true
-      const params = Object.assign(row, {
-        allocationWarehouseSn: this.chooseParam.allocationWarehouseSn
-      })
+      const params = Object.assign(row, { allocationWarehouseSn: this.chooseParam.allocationWarehouseSn })
       params.allocationCost = params.putCost
+      params.outWarehouseLocationSn = row.warehouseLocationSn
       allocWarehouseDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
@@ -588,7 +567,7 @@ export default {
     //  提交
     handleSubmit () {
       this.submitLoading = true
-      allocWarehouseSubmit({ id: this.id }).then(res => {
+      allocWarehouseSubmit({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.handleBack()

+ 4 - 14
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -19,14 +19,14 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="调出仓库">
               <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="queryParam.outWarehouseSn">
-                <a-select-option v-for="item in warehouseList" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="调入仓库">
               <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="queryParam.putWarehouseSn">
-                <a-select-option v-for="item in warehouseList" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
@@ -71,10 +71,6 @@
       <template slot="allocationWarehouseNo" slot-scope="text, record">
         <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
       </template>
-      <!-- 状态 -->
-      <template slot="state" slot-scope="text, record">
-        {{ text }}
-      </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
         <a-button
@@ -107,7 +103,7 @@
       </template>
     </s-table>
     <!-- 新增/编辑 -->
-    <basic-info-modal :openModal="openModal" @ok="handleEdit" @close="openModal = false" />
+    <basic-info-modal :openModal="openModal" @ok="handleEdit" @close="openModal=false" />
   </a-card>
 </template>
 
@@ -165,8 +161,7 @@ export default {
           return data
         })
       },
-      openModal: false, //  新增编辑  弹框
-      itemId: '' //  当前品牌id
+      openModal: false //  新增编辑  弹框
     }
   },
   methods: {
@@ -177,7 +172,6 @@ export default {
     // 获取仓库列表
     getWarehouseList () {
       warehouseAllList({}).then(res => {
-        console.log(res, '-----仓库----')
         if (res.status == 200) {
           this.warehouseList = res.data || []
         } else {
@@ -193,10 +187,6 @@ export default {
       this.creatDate = undefined
       this.$refs.table.refresh(true)
     },
-    //  基本信息  保存
-    handleOk (data) {
-      this.$router.push({ path: `/allocationManagement/warehouseAllocation/add` })
-    },
     //  删除
     handleDel (row) {
       const _this = this