|
@@ -86,7 +86,11 @@
|
|
|
<el-table-column prop="productCode" label="货品编码" />
|
|
|
<el-table-column prop="productName" label="货品名称" />
|
|
|
<el-table-column prop="productSpec" label="规格型号" />
|
|
|
- <el-table-column prop="productUnit" label="单位" />
|
|
|
+ <el-table-column
|
|
|
+ prop="productUnit"
|
|
|
+ label="单位"
|
|
|
+ :formatter="(row) => dictValueLabel(row.productUnit, productUnit)"
|
|
|
+ />
|
|
|
<el-table-column prop="purchaseCount" label="采购数量" />
|
|
|
<el-table-column prop="sumArrivalCount" label="已到货" />
|
|
|
<el-table-column prop="count" label="本次到货" min-width="150">
|
|
@@ -287,17 +291,19 @@ const config = computed(() => {
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
return [
|
|
|
- {
|
|
|
- attrs: {
|
|
|
- label: "到货通知",
|
|
|
- type: "primary",
|
|
|
- text: true,
|
|
|
- },
|
|
|
- el: "button",
|
|
|
- click() {
|
|
|
- handleArrival(row);
|
|
|
- },
|
|
|
- },
|
|
|
+ row.purchaseStatus == 30
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "到货通知",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ handleArrival(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "作废",
|
|
@@ -462,14 +468,20 @@ const handleEdit = (row, status) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-// 获取供应商数据
|
|
|
const supplierData = ref([]);
|
|
|
-const getSupplierList = async (req) => {
|
|
|
+const productUnit = ref([]);
|
|
|
+const getDict = async (req) => {
|
|
|
proxy
|
|
|
.post("/supplierInfo/page", { pageNum: 1, pageSize: 9999 })
|
|
|
.then((res) => {
|
|
|
supplierData.value = res.rows;
|
|
|
});
|
|
|
+ proxy.getDictOne(["unit"]).then((res) => {
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
};
|
|
|
const handleArrival = (row) => {
|
|
|
proxy.post("/purchase/detail", { id: row.id }).then((res) => {
|
|
@@ -490,7 +502,7 @@ const handleArrival = (row) => {
|
|
|
};
|
|
|
|
|
|
getList();
|
|
|
-getSupplierList();
|
|
|
+getDict();
|
|
|
const start = () => {
|
|
|
proxy.$router.replace({
|
|
|
path: "/platform_manage/process/processApproval",
|