|
@@ -7,7 +7,7 @@
|
|
<el-form-item label="单据标题">
|
|
<el-form-item label="单据标题">
|
|
<el-input
|
|
<el-input
|
|
v-model.trim="queryParams.docSubject"
|
|
v-model.trim="queryParams.docSubject"
|
|
- size="mini"
|
|
|
|
|
|
+ :size="size"
|
|
clearable
|
|
clearable
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
/>
|
|
/>
|
|
@@ -19,13 +19,13 @@
|
|
<el-select
|
|
<el-select
|
|
multiple
|
|
multiple
|
|
v-model="queryParams.modelIds"
|
|
v-model="queryParams.modelIds"
|
|
- size="mini"
|
|
|
|
|
|
+ :size="size"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
clearable
|
|
clearable
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="dict in dict.type.oa_templete_id"
|
|
v-for="dict in dict.type.oa_templete_id"
|
|
- :key="dict.value"
|
|
|
|
|
|
+ :prop="dict.value"
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
>
|
|
>
|
|
@@ -37,19 +37,15 @@
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
<div style="position: absolute; top: 18px; right: 10px">
|
|
<div style="position: absolute; top: 18px; right: 10px">
|
|
- <el-button type="primary" size="mini" @click="searchList"
|
|
|
|
|
|
+ <el-button type="primary" :size="size" @click="searchList"
|
|
>搜索</el-button
|
|
>搜索</el-button
|
|
>
|
|
>
|
|
- <el-button size="mini" plain @click="resetList">重置</el-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div class="btn_grooup">
|
|
|
|
- <!-- <el-button type="primary" size="mini" @click="audits">批量审批</el-button> -->
|
|
|
|
|
|
+ <el-button :size="size" plain @click="resetList">重置</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
<el-table
|
|
- :data="tableList"
|
|
|
|
fit
|
|
fit
|
|
|
|
+ :data="tableList"
|
|
:cell-style="{ borderColor: '#c0c0c0' }"
|
|
:cell-style="{ borderColor: '#c0c0c0' }"
|
|
:header-cell-style="{ borderColor: '#c0c0c0' }"
|
|
:header-cell-style="{ borderColor: '#c0c0c0' }"
|
|
class="exporttable"
|
|
class="exporttable"
|
|
@@ -57,12 +53,11 @@
|
|
border
|
|
border
|
|
highlight-current-row
|
|
highlight-current-row
|
|
style="font-size: 12px"
|
|
style="font-size: 12px"
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
|
|
+ @selection-change="(selection) => (ids = selection)"
|
|
@row-click="rowSelect"
|
|
@row-click="rowSelect"
|
|
@row-dblclick="doubleClick"
|
|
@row-dblclick="doubleClick"
|
|
ref="tables"
|
|
ref="tables"
|
|
>
|
|
>
|
|
- <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
label="序号"
|
|
label="序号"
|
|
type="index"
|
|
type="index"
|
|
@@ -84,12 +79,15 @@
|
|
/>
|
|
/>
|
|
<el-table-column fixed="right" label="操作" align="center" width="180">
|
|
<el-table-column fixed="right" label="操作" align="center" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="mini" @click="check(scope.row)"
|
|
|
|
|
|
+ <el-button type="text" :size="size" @click.stop="check(scope.row)"
|
|
>查看</el-button
|
|
>查看</el-button
|
|
>
|
|
>
|
|
- <el-button type="text" size="mini" @click="audit(scope.row)"
|
|
|
|
|
|
+ <el-button type="text" :size="size" @click.stop="audit(scope.row)"
|
|
>审批</el-button
|
|
>审批</el-button
|
|
>
|
|
>
|
|
|
|
+ <!-- <el-button type="text" :size="size" @click.stop="reject(scope.row)"
|
|
|
|
+ >驳回</el-button
|
|
|
|
+ > -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -107,6 +105,7 @@
|
|
<span>单据概述</span>
|
|
<span>单据概述</span>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
|
|
+ v-if="cols.length !== 0"
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:data="sonTableList"
|
|
:data="sonTableList"
|
|
fit
|
|
fit
|
|
@@ -119,7 +118,6 @@
|
|
style="font-size: 12px"
|
|
style="font-size: 12px"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-if="cols.length !== 0"
|
|
|
|
label="序号"
|
|
label="序号"
|
|
type="index"
|
|
type="index"
|
|
align="center"
|
|
align="center"
|
|
@@ -127,8 +125,6 @@
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
v-for="(col, index) in cols"
|
|
v-for="(col, index) in cols"
|
|
- :key="index"
|
|
|
|
- align="center"
|
|
|
|
:prop="col.prop"
|
|
:prop="col.prop"
|
|
:label="col.label"
|
|
:label="col.label"
|
|
:width="col.width"
|
|
:width="col.width"
|
|
@@ -174,23 +170,27 @@ import {
|
|
auditWork,
|
|
auditWork,
|
|
getWorkDetailList,
|
|
getWorkDetailList,
|
|
} from "@/api/purchase/workSpace.js";
|
|
} from "@/api/purchase/workSpace.js";
|
|
|
|
+import RULE from "./columns";
|
|
|
|
+import { dicts } from "./dicts";
|
|
export default {
|
|
export default {
|
|
name: "workSpace",
|
|
name: "workSpace",
|
|
- dicts: ["oa_templete_id", "sys_price_type"],
|
|
|
|
|
|
+ dicts: [...dicts, "oa_templete_id"],
|
|
components: {
|
|
components: {
|
|
ElDictTag: () => import("@/components/DictTag/index.vue"),
|
|
ElDictTag: () => import("@/components/DictTag/index.vue"),
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
const page = this.$init.page();
|
|
const page = this.$init.page();
|
|
|
|
+ const columns = RULE;
|
|
return {
|
|
return {
|
|
page: page,
|
|
page: page,
|
|
|
|
+ Columns: columns,
|
|
|
|
+ size: "mini",
|
|
queryParams: {
|
|
queryParams: {
|
|
modelIds: [],
|
|
modelIds: [],
|
|
docSubject: "",
|
|
docSubject: "",
|
|
},
|
|
},
|
|
loading: false,
|
|
loading: false,
|
|
tableList: [],
|
|
tableList: [],
|
|
- total: 0,
|
|
|
|
ids: [],
|
|
ids: [],
|
|
sonTableList: [],
|
|
sonTableList: [],
|
|
sonQuery: {
|
|
sonQuery: {
|
|
@@ -217,7 +217,6 @@ export default {
|
|
let { code, rows, total } = await getWorkSpaceList(params);
|
|
let { code, rows, total } = await getWorkSpaceList(params);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
this.tableList = rows;
|
|
this.tableList = rows;
|
|
- // this.total = res.total;
|
|
|
|
this.page.total = total;
|
|
this.page.total = total;
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -237,9 +236,6 @@ export default {
|
|
this.page = this.$init.page();
|
|
this.page = this.$init.page();
|
|
this.searchList();
|
|
this.searchList();
|
|
},
|
|
},
|
|
- handleSelectionChange(selection) {
|
|
|
|
- this.ids = selection;
|
|
|
|
- },
|
|
|
|
doubleClick(row) {
|
|
doubleClick(row) {
|
|
this.rowSelect(row);
|
|
this.rowSelect(row);
|
|
},
|
|
},
|
|
@@ -250,165 +246,7 @@ export default {
|
|
// this.check(row)
|
|
// this.check(row)
|
|
// 选择行存储便于子表分页
|
|
// 选择行存储便于子表分页
|
|
this.checkRow = row;
|
|
this.checkRow = row;
|
|
- // 采购需求单
|
|
|
|
- if (row.type == "PU_DEMAND_RULE") {
|
|
|
|
- this.cols = [
|
|
|
|
- { label: "物料编码", prop: "materialCode" },
|
|
|
|
- { label: "物料名称", prop: "materialName" },
|
|
|
|
- { label: "规格", prop: "specification" },
|
|
|
|
- { label: "单位", prop: "unitName", width: 50 },
|
|
|
|
- { label: "生产厂家/代理人", prop: "manufacturerName" },
|
|
|
|
- { label: "实际(业务)需求量", prop: "qty", width: 130 },
|
|
|
|
- { label: "月均销量", prop: "averageQtyMonth", width: 80 },
|
|
|
|
- { label: "需求可用周期", prop: "demandPeriod", width: 80 },
|
|
|
|
- { label: "业务备注", prop: "remark" },
|
|
|
|
- {
|
|
|
|
- label: "紧急标识",
|
|
|
|
- prop: "isUrgency",
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isUrgency == "Y" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- width: 80,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "补单标识",
|
|
|
|
- prop: "isReplenishment",
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isReplenishment == "Y" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- width: 80,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- // 调拨订单
|
|
|
|
- } else if (row.type == "ALLOT_RULE") {
|
|
|
|
- this.cols = [
|
|
|
|
- { label: "物料编码", prop: "materialCode", width: 120 },
|
|
|
|
- { label: "物料名称", prop: "materialName" },
|
|
|
|
- { label: "规格", prop: "specification" },
|
|
|
|
- { label: "单位", prop: "unitName" },
|
|
|
|
- { label: "生产厂家/代理人", prop: "manufacturerName" },
|
|
|
|
- { label: "调出仓库", prop: "deliveryWarehouseName" },
|
|
|
|
- { label: "调出货位", prop: "deliveryAllocationName" },
|
|
|
|
- { label: "数量", prop: "qty", width: 50 },
|
|
|
|
- { label: "调入仓库", prop: "storageWarehouseName" },
|
|
|
|
- { label: "调入货位", prop: "storageAllocationName" },
|
|
|
|
- ];
|
|
|
|
- // 物料申请单
|
|
|
|
- } else if (row.type == "MATERIAL_APPLY_RULE") {
|
|
|
|
- this.cols = [
|
|
|
|
- { label: "物料一级分类", prop: "classOneName", width: 120 },
|
|
|
|
- { label: "物料基本分类", prop: "classifyName", width: 120 },
|
|
|
|
- { label: "物料名称", prop: "materialName" },
|
|
|
|
- { label: "规格", prop: "specification" },
|
|
|
|
- { label: "生产厂家/代理人", prop: "manufacturerName" },
|
|
|
|
- { label: "注册证号", prop: "registrationNo" },
|
|
|
|
- { label: "注册人", prop: "registrant" },
|
|
|
|
- { label: "存储条件", prop: "storageCondition" },
|
|
|
|
- { label: "运输条件", prop: "transportationCondition", width: 80 },
|
|
|
|
- // {label: '是否医药物料', prop: 'isMedicine',
|
|
|
|
- // formatter: function(row, column, cellValue, index) {
|
|
|
|
- // return row.isMedicine == '0' ? '是' : '否'
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- label: "是否药品",
|
|
|
|
- prop: "isDrug",
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isDrug == "0" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- width: 80,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- // 价格申报单
|
|
|
|
- } else if (row.type == "PU_PRICE_APPLY_RULE") {
|
|
|
|
- // 价格
|
|
|
|
- this.cols = [
|
|
|
|
- { label: "物料编码", prop: "materialCode", width: 120 },
|
|
|
|
- { label: "物料名称", prop: "materialName" },
|
|
|
|
- { label: "规格", prop: "specification" },
|
|
|
|
- { label: "生产厂家/代理人", prop: "manufacturerName" },
|
|
|
|
- { label: "含税单价", prop: "taxPrice", width: 80 },
|
|
|
|
- { label: "最近价格", prop: "recentlyPrice", width: 80 },
|
|
|
|
- { label: "单价差", prop: "priceDiffer", width: 80 },
|
|
|
|
- { label: "申请理由", prop: "explainStr" },
|
|
|
|
- { label: "客户", prop: "customerName" },
|
|
|
|
- { label: "供应商名称1", prop: "supplierName1" },
|
|
|
|
- { label: "单价1", prop: "unitPrice1", width: 70 },
|
|
|
|
- { label: "供应商名称2", prop: "supplierName2" },
|
|
|
|
- { label: "单价2", prop: "unitPrice2", width: 70 },
|
|
|
|
- { label: "供应商名称3", prop: "supplierName3" },
|
|
|
|
- { label: "单价3", prop: "unitPrice3", width: 70 },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- label: "价格类型",
|
|
|
|
- prop: "priceType",
|
|
|
|
- attr: {
|
|
|
|
- is: "el-dict-tag",
|
|
|
|
- dictName: "sys_price_type",
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "配送价",
|
|
|
|
- prop: "isDistributionPrice",
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isDistributionPrice == "Y" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- { label: "价格有效期(起)", prop: "periodBegin" },
|
|
|
|
- { label: "价格有效期(止)", prop: "periodEnd" },
|
|
|
|
- { label: "币种名称", prop: "currencyName" },
|
|
|
|
- { label: "无税单价", prop: "price" },
|
|
|
|
- { label: "采购换算率", prop: "conversionRate" },
|
|
|
|
- { label: "采购单位名称", prop: "puUnitName" },
|
|
|
|
- { label: "单位名称", prop: "unitName" },
|
|
|
|
- { label: "调整类型", prop: "isPriceAdjustment" },
|
|
|
|
- {
|
|
|
|
- label: "首次报批",
|
|
|
|
- prop: "isApprovalFirst",
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isApprovalFirst == "Y" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- { label: "预计年采购量", prop: "yPurchaseQuantity" },
|
|
|
|
- { label: "预计年影响量", prop: "yAffectedAmount" },
|
|
|
|
- { label: "涨幅", prop: " increase" },
|
|
|
|
- ];
|
|
|
|
- // 采购订单
|
|
|
|
- } else if (row.type == "PU_ORDER_RULE") {
|
|
|
|
- this.cols = [
|
|
|
|
- { label: "收货客户", prop: "customerName" },
|
|
|
|
- { label: "物料编码", prop: "materialCode", width: 120 },
|
|
|
|
- { label: "物料名称", prop: "materialName" },
|
|
|
|
- { label: "生产厂家", prop: "manufacturerName" },
|
|
|
|
- // {label: '医药物料', prop: 'isMedcine'},
|
|
|
|
- { label: "数量", prop: "qty", width: 60 },
|
|
|
|
- { label: "含税单价", prop: "taxPrice", width: 80 },
|
|
|
|
- {
|
|
|
|
- label: "价税合计",
|
|
|
|
- prop: "money",
|
|
|
|
- width: 80,
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.money ? parseFloat(row.money).toFixed(2) : "0.00";
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "赠品",
|
|
|
|
- prop: "isGift",
|
|
|
|
- width: 50,
|
|
|
|
- formatter: function (row, column, cellValue, index) {
|
|
|
|
- return row.isGift == "Y" ? "是" : "否";
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- { label: "折扣%", prop: "nitemdiscountrate", width: 70 },
|
|
|
|
- { label: "价格类型", prop: "priceType", width: 80 },
|
|
|
|
-
|
|
|
|
- { label: "规格", prop: "specification" },
|
|
|
|
- { label: "单位", prop: "unitName" },
|
|
|
|
- { label: "税率", prop: "tax" },
|
|
|
|
- { label: "注册证号", prop: "registration" },
|
|
|
|
- { label: "需求单号", prop: "demandCode" },
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
|
|
+ this.cols = [...this.Columns[row.type]];
|
|
this.getDetailList(this.checkRow);
|
|
this.getDetailList(this.checkRow);
|
|
},
|
|
},
|
|
audits() {
|
|
audits() {
|
|
@@ -474,7 +312,36 @@ export default {
|
|
this.sonTableList = [];
|
|
this.sonTableList = [];
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ // 驳回
|
|
|
|
+ reject(row) {
|
|
|
|
+ this.$prompt(
|
|
|
|
+ "<div>请填写驳回原因 <span style='color:#ff6262'>注:只能驳回到起草节点</span></div>",
|
|
|
|
+ "提示",
|
|
|
|
+ {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ inputPattern: /\s*\S+?/,
|
|
|
|
+ inputErrorMessage: "驳回原因不能为空",
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ .then(async ({ value }) => {
|
|
|
|
+ console.log(value, "value");
|
|
|
|
+ try {
|
|
|
|
+ this.$modal.loading("加载中...");
|
|
|
|
+ // let {code,msg} = await
|
|
|
|
+ // if(code=== 200){
|
|
|
|
+ // }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ } finally {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$modal.closeLoading();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
// 获取单据概述列表
|
|
// 获取单据概述列表
|
|
async getDetailList(row) {
|
|
async getDetailList(row) {
|
|
try {
|
|
try {
|
|
@@ -493,7 +360,6 @@ export default {
|
|
} finally {
|
|
} finally {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|