From 84a4fe2072b93f767b6747045af0cff8d212d9e9 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期六, 23 三月 2024 15:24:19 +0800
Subject: [PATCH] 采购订单联调收货信息接口,状态修改
---
src/views/purchaseManage/purchase/index.vue | 26 +++++++++---
src/components/makepager/CommonFormTableView.vue | 26 +++++++++++-
src/views/purchaseManage/purchase/components/TestingAll.vue | 25 ++++++++++--
3 files changed, 63 insertions(+), 14 deletions(-)
diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 822b967..f03f1ab 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -12,7 +12,7 @@
@selection-change="handleSelectionChange"
:row-key="(row) => row.productId"
>
- <el-table-column v-if="selectBox" type="selection" :reserve-selection="true" width="40" align="center">
+ <el-table-column v-if="selectBox" type="selection" :selectable="isDisabled" :reserve-selection="true" width="40" align="center">
</el-table-column>
<el-table-column v-if="tableList.isReturn" type="index" label="#" width="50" align="center"></el-table-column>
@@ -36,7 +36,6 @@
<!-- column鏍峰紡 -->
<template slot-scope="scope">
<template v-if="!detailEnter || isOperate">
-
<el-form-item
v-if="item.input"
label=" "
@@ -56,7 +55,12 @@
></el-input>
</el-form-item>
<span v-else-if="item.compute">{{ calculateDifference(scope.row) }}</span>
-
+ <!-- 璋冪敤鏂规硶鏄剧ず鏂囧瓧 -->
+ <div v-else-if="item.isCallMethod">
+ <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{
+ item.getCallMethod(scope.row[item.prop], scope.row)
+ }}</span>
+ </div>
<el-form-item
v-else-if="item.productName"
label=" "
@@ -239,6 +243,11 @@
type: Boolean,
default: false
},
+ // selection 閫夋嫨鐘舵�� 椤甸潰
+ name: {
+ type: String,
+ default: "",
+ },
isBoder:{
type: Boolean,
default: false
@@ -327,6 +336,17 @@
},
computed: {},
methods: {
+ isDisabled(row){
+ if (this.name == "rework") {
+ if (row.status == 1) {
+ return true;
+ } else {
+ return false;
+ }
+ }else {
+ return true;
+ }
+ },
calculateDifference(row) {
if (row.notReceiveAmount !== null && row.nowReceiveAmount !== null) {
row.surplusReceiveAmount=row.notReceiveAmount - row.nowReceiveAmount;
diff --git a/src/views/purchaseManage/purchase/components/TestingAll.vue b/src/views/purchaseManage/purchase/components/TestingAll.vue
index 07208f3..524eba6 100644
--- a/src/views/purchaseManage/purchase/components/TestingAll.vue
+++ b/src/views/purchaseManage/purchase/components/TestingAll.vue
@@ -11,7 +11,8 @@
style="height: 60vh; overflow-x: hidden">
<div class="basic-info">
<div class="product-view">
- <CommonFormTableView :isBoder="true" :selectBox="true" :detailEnter="true" :recalculateShow="false"
+ <CommonFormTableView :isBoder="true"
+ name="rework" :selectBox="true" :detailEnter="true" :recalculateShow="false"
:addTypeIdMultiple="true" :product-table-list="productTableList" sign="purchase" @rowClick="rowClick"
@getSelectArray="getSelectArray" @toFiltering="toFiltering">
@@ -42,6 +43,7 @@
savePurchaseQualityInspectionInfo
} from "@/api/purchaseManage/purchase"
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
+import { getDataByType } from "@/api/data"
export default {
name: "ArrivalConfirmation",
components: { CommonFormTableView },
@@ -96,7 +98,8 @@
],
thatStatus: [],
thatTimes: [],
- selectList: []
+ selectList: [],
+ qualityStatusList: getDataByType("qualityStatus"),
}
},
created() {
@@ -189,10 +192,13 @@
{ label: "鏁伴噺", prop: "amount" },
{ label: "鍗曚綅", prop: "unit" },
{
- label: "鐘舵��", prop: "status",
+ label: "鐘舵��",
+ prop: "status",
isFilter: true,
isFilterList: this.statusList,
selectedListDefault: this.getSelectedOperateStatus([], this.statusList),
+ isCallMethod: true,
+ getCallMethod: this.getpurchaseStatus
},
]
}
@@ -265,7 +271,18 @@
falseClick(row) {
console.log(row, "row")
- }
+ },
+ getpurchaseStatus(val) {
+ if (val) {
+ for (let i in this.qualityStatusList) {
+ if (this.qualityStatusList[i].id == val) {
+ return this.qualityStatusList[i].name
+ }
+ }
+ } else {
+ return "--"
+ }
+ },
}
}
</script>
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index f052302..affa53a 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -148,6 +148,7 @@
getPurchaseInfo,
newSubmitPurchase,
deletePurchase,
+ getPurchaseQualityInspectionInfo,
getOperationInfo
} from "@/api/purchaseManage/purchase"
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
@@ -178,13 +179,13 @@
]
// 鏀惰揣淇℃伅
const recriveColumn = [
- { label: "鏀惰揣鏃堕棿", prop: "operationNumber", default: true },
+ { label: "鏀惰揣鏃堕棿", prop: "createTime", default: true },
{ label: "鏀惰揣浜�", prop: "principal" },
- { label: "浜у搧鍚嶇О", prop: "name" },
- { label: "浜у搧缂栫爜", prop: "number" },
- { label: "瑙勬牸", prop: "warehouseName" },
+ { label: "浜у搧鍚嶇О", prop: "productName" },
+ { label: "浜у搧缂栫爜", prop: "productId" },
+ { label: "瑙勬牸", prop: "specs" },
{ label: "鏁伴噺", prop: "amount" },
- { label: "鍗曚綅", prop: "overTime" },
+ { label: "鍗曚綅", prop: "unit" },
{ label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus }
]
// 鍏ュ簱淇℃伅
@@ -665,7 +666,6 @@
},
// 鑾峰彇浜у搧/鏀惰揣淇℃伅
async getProductInventoryInfo(row) {
- console.log(row)
if (this.TabsIndex == 0 && row.status == 1) {
getPurchaseInfo({ id: row.id }).then((res) => {
if (res.code == 200) {
@@ -676,7 +676,17 @@
})
} else if (this.TabsIndex == 1 && row.status == 1) {
this.productTableList.tableInfomation = []
- } else {
+ } else if(this.TabsIndex==1 && row.status==7||row.status==8){
+ getPurchaseQualityInspectionInfo({
+ purchaseNumber: row.number,
+ }).then((res)=>{
+ if (res.code == 200) {
+ this.productTableList.tableInfomation = res.data
+ } else {
+ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
+ }""
+ })
+ }else if(this.TabsIndex==2){
getOperationInfo({ id: row.id }).then((res) => {
if (res.code == 200) {
this.productTableList.tableInfomation = res.data
@@ -684,6 +694,8 @@
this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
}
})
+ }else{
+ this.productTableList.tableInfomation =[]
}
}
}
--
Gitblit v1.8.0