瀏覽代碼

Merge branch 'dev_pu_ownership' into dev

# Conflicts:
#	src/views/purchase/PurchaseDemandList/reserved.vue
#	src/views/purchase/ownership/index.vue
#	src/views/purchase/transferOrder/reserved.vue
001295 1 年之前
父節點
當前提交
a34cdbbe69

+ 126 - 0
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="reserved">
+    <el-dialog
+      :visible.sync="visible"
+      :before-close="handleClose"
+      width="70%"
+    >
+      <el-descriptions class="margin-top" title="货权预留单" :column="3" size="small" border>
+        <el-descriptions-item>
+          <template slot="label">
+            预留单据号
+          </template>
+          {{ resData.code }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            来源单据号
+          </template>
+          {{ resData.source }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            客户名称
+          </template>
+          {{ resData.customerName }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            创建人
+          </template>
+          {{ resData.createByName }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            创建人编码
+          </template>
+          {{ resData.createBy }}
+        </el-descriptions-item>
+        <el-descriptions-item>
+          <template slot="label">
+            创建时间
+          </template>
+          {{ resData.createTime }}
+        </el-descriptions-item>
+      </el-descriptions>
+      <el-table style="margin-top: 50px" :data="items" @row-click="rowClick" height="300px">
+        <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="unitName" label="单位" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allocationName" label="货位" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="totalIn" label="累计入库数量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
+      </el-table>
+      <el-table style="margin-top: 50px" :data="showHistoryItems" height="300px">
+        <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="unitName" label="单位" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip label="操作单据" align="center" prop="operateBill"  width="150">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ow_operatetype" :value="scope.row.operateBill"/>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip prop="operateBillcode" label="操作单据编码" width="200"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="operateBillitem" label="操作明细行号" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150">
+          <template slot-scope="scope">
+            {{scope.row.allotQty > 0 ? "+" + scope.row.allotQty : scope.row.allotQty}}
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip prop="createTime" label="操作时间" width="150"></el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {getDetailBySource} from '@/api/purchase/ownership.js'
+
+export default {
+  dicts: ['ow_operatetype'],
+  props: {
+    isVisible: {
+      type: Boolean,
+      default: false
+    },
+    info: {
+      type: Object,
+      default: null
+    }
+  },
+  mounted() {
+    this.getDetails(this.info)
+  },
+  data() {
+    return {
+      visible:this.isVisible,
+      resData: {},
+      items: [],
+      historyItems: [],
+      showHistoryItems: [],
+    }
+  },
+  methods: {
+    getDetails(row) {
+      getDetailBySource(row.code).then(res => {
+        if (res.code === 200) {
+          this.resData = res.data;
+          this.items = res.data.stMaterialOwnershipItemList;
+          this.historyItems = res.data.stMaterialOwnershipHistoryList;
+          this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == this.items[0].id);
+        }
+      })
+    },
+    handleClose() {
+      this.$emit('updateReserved', false)
+    },
+    rowClick(row){
+      this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == row.id);
+    }
+  }
+}
+</script>

+ 11 - 11
src/views/purchase/ownership/index.vue

@@ -56,8 +56,8 @@
     >
       <el-table-column label="序号" type="index" width="50" align="center" fixed/>
       <el-table-column show-overflow-tooltip width="200" label="来源单据" align="center" prop="source" />
-      <el-table-column show-overflow-tooltip width="150" label="集采编号" align="center" prop="puCode" />
-      <el-table-column show-overflow-tooltip width="200" label="客户" align="center" prop="customerName" />
+      <el-table-column show-overflow-tooltip width="200" label="客户" align="center" prop="customerName" />、
+      <el-table-column show-overflow-tooltip width="150" label="仓库" align="center" prop="warehouseName" />
       <el-table-column show-overflow-tooltip width="150" label="物料编码" align="center" prop="materialCode" />
       <el-table-column show-overflow-tooltip width="300" label="物料" align="center" prop="materialName" />
       <el-table-column show-overflow-tooltip width="150" label="可用量" align="center" prop="qty" />
@@ -103,12 +103,13 @@
         ref="form"
         :model="form"
         label-width="80px"
+        v-loading="dialogLoading"
       >
         <el-descriptions :column="1">
           <el-descriptions-item label="单据来源">{{form.source}}</el-descriptions-item>
-          <el-descriptions-item label="集采编号">{{form.puCode}}</el-descriptions-item>
           <el-descriptions-item label="创建时间">{{form.createTime}}</el-descriptions-item>
           <el-descriptions-item label="客户">{{form.customerName}}</el-descriptions-item>
+          <el-descriptions-item label="仓库">{{form.warehouseName}}</el-descriptions-item>
           <el-descriptions-item label="物料编码">{{form.materialCode}}</el-descriptions-item>
           <el-descriptions-item label="物料" span="2">{{form.materialName}}</el-descriptions-item>
           <el-descriptions-item label="已用量">{{form.usedQty}}</el-descriptions-item>
@@ -129,9 +130,10 @@
           size="mini"
           type="primary"
           @click="submitForm"
+          v-loading="dialogLoading"
           >确 定</el-button
         >
-        <el-button size="mini" @click="cancel">取 消</el-button>
+        <el-button size="mini" @click="cancel" v-loading="dialogLoading">取 消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -145,13 +147,9 @@ export default {
   data() {
     return {
       // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
+      loading: false,
+      // 遮罩层
+      dialogLoading: false,
       // 总条数
       total: 0,
       // 列表数据
@@ -260,7 +258,9 @@ export default {
     },
     /** 提交表单 */
     submitForm() {
+      this.dialogLoading = true;
       update(this.form).then(response => {
+        this.dialogLoading = false;
         this.$modal.msgSuccess("修改成功");
         this.open = false;
         this.getList();

+ 2 - 0
src/views/purchase/transferOrder/add.vue

@@ -2150,6 +2150,8 @@ export default {
       this.basicForm.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName;
       this.basicForm.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant;
       this.basicForm.materialInfo[this.tableIndex].production = selection[0].productionPermit;
+      this.basicForm.materialInfo[this.tableIndex].materialClassifyOne = selection[0].oneClass.split('&')[1];
+      this.basicForm.materialInfo[this.tableIndex].materialClassifyOneName = selection[0].oneClassName;
       // 根据物料单位id查询单位code
       this.reBackRefer("UNIT_PARAM", selection[0].unitId);
     },

+ 10 - 12
src/views/purchase/transferOrder/reserved.vue

@@ -47,32 +47,31 @@
         <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allocationName" label="货位" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="totalIn" label="累计入库数量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="allocationName" label="货位名称" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
       </el-table>
       <el-table style="margin-top: 50px" :data="showHistoryItems" height="300px">
-        <el-table-column prop="materialCode" label="物料编码" width="150"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="200"></el-table-column>
-        <el-table-column prop="unitName" label="单位" width="100"></el-table-column>
-        <el-table-column prop="productBatchNum" label="批号" width="100"></el-table-column>
-        <el-table-column label="操作单据" align="center" prop="operateBill"  width="100">
+        <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库" width="150"></el-table-column>
+        <el-table-column label="操作单据" align="center" prop="operateBill"  width="150">
           <template slot-scope="scope">
             <dict-tag :options="dict.type.ow_operatetype" :value="scope.row.operateBill"/>
           </template>
         </el-table-column>
         <el-table-column show-overflow-tooltip prop="operateBillcode" label="操作单据编码" width="200"></el-table-column>
-        <el-table-column prop="operateBillitem" label="操作明细行号" width="150"></el-table-column>
-        <el-table-column prop="allotQty" label="操作数量" width="150">
+        <el-table-column show-overflow-tooltip prop="operateBillitem" label="操作明细行号" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150">
           <template slot-scope="scope">
             {{scope.row.allotQty > 0 ? "+" + scope.row.allotQty : scope.row.allotQty}}
           </template>
         </el-table-column>
-        <el-table-column prop="createTime" label="操作时间" width="200"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="createTime" label="操作时间" width="150"></el-table-column>
       </el-table>
     </el-dialog>
   </div>
@@ -82,7 +81,6 @@
 import {getDetailBySource} from '@/api/purchase/ownership.js'
 
 export default {
-  dicts: ['ow_operatetype'],
   props: {
     isVisible: {
       type: Boolean,