|
@@ -14,8 +14,7 @@
|
|
|
action: () => newContract(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ @get-list="getList">
|
|
|
<!-- <template #code="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
<a
|
|
@@ -27,11 +26,7 @@
|
|
|
</template> -->
|
|
|
<template #code="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- @click="openDetails(item)"
|
|
|
- >{{ item.code }}</a
|
|
|
- >
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item)">{{ item.code }}</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #amount="{ item }">
|
|
@@ -62,16 +57,12 @@
|
|
|
<span v-if="item.refundStatus && item.refundStatus !== 0">
|
|
|
{{ dictValueLabel(item.refundStatus, refundStatusNew) }}
|
|
|
</span>
|
|
|
- <span v-else>{{
|
|
|
- dictValueLabel(item.refundStatusNew, refundStatusNew)
|
|
|
- }}</span>
|
|
|
+ <span v-else>{{ dictValueLabel(item.refundStatusNew, refundStatusNew) }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #status="{ item }">
|
|
|
<div>
|
|
|
- <span :style="getStyle(item.status)">{{
|
|
|
- dictValueLabel(item.status, status)
|
|
|
- }}</span>
|
|
|
+ <span :style="getStyle(item.status)">{{ dictValueLabel(item.status, status) }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
@@ -82,18 +73,11 @@
|
|
|
<template #footer>
|
|
|
<el-button @click="openPrint = false" size="large">取消</el-button>
|
|
|
<el-button v-print="printObj" size="large">打印</el-button>
|
|
|
- <el-button type="primary" @click="clickDownload()" size="large"
|
|
|
- >下载PDF</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="合同详情"
|
|
|
- v-if="openDetailsDialog"
|
|
|
- v-model="openDetailsDialog"
|
|
|
- width="1000"
|
|
|
- >
|
|
|
+ <el-dialog title="合同详情" v-if="openDetailsDialog" v-model="openDetailsDialog" width="1000">
|
|
|
<ContractDetails :contractId="currentContractId"></ContractDetails>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -319,6 +303,28 @@ const config = computed(() => {
|
|
|
},
|
|
|
}
|
|
|
: {},
|
|
|
+ row.issue && row.issue === "0" && row.status == 30
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "下发交接单",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ ElMessageBox.confirm("是否确认下发交接单?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ proxy.post("/contract/edit", { id: row.id, issue: 1 }).then(() => {
|
|
|
+ ElMessage({ message: "下发成功", type: "success" });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
row.status == 30
|
|
|
? {
|
|
|
attrs: {
|
|
@@ -351,15 +357,11 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm(
|
|
|
- "此操作将永久删除该数据, 是否继续?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- ).then(() => {
|
|
|
+ ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
proxy
|
|
|
.post("/contract/edit", {
|
|
|
id: row.id,
|
|
@@ -381,46 +383,38 @@ const config = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
- proxy
|
|
|
- .getDictOne([
|
|
|
- "contract_type",
|
|
|
- "account_currency",
|
|
|
- "trade_mode",
|
|
|
- "shipping_method",
|
|
|
- "unit",
|
|
|
- ])
|
|
|
- .then((res) => {
|
|
|
- if (res.contract_type && res.contract_type.length > 0) {
|
|
|
- contractType.value = res.contract_type.map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- }
|
|
|
- if (res.account_currency && res.account_currency.length > 0) {
|
|
|
- accountCurrency.value = res.account_currency.map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- }
|
|
|
- if (res.trade_mode && res.trade_mode.length > 0) {
|
|
|
- tradeMethods.value = res.trade_mode.map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- }
|
|
|
- if (res.shipping_method && res.shipping_method.length > 0) {
|
|
|
- shippingMethod.value = res.shipping_method.map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- }
|
|
|
- if (res.unit && res.unit.length > 0) {
|
|
|
- productUnit.value = res.unit.map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- }
|
|
|
- });
|
|
|
+ proxy.getDictOne(["contract_type", "account_currency", "trade_mode", "shipping_method", "unit"]).then((res) => {
|
|
|
+ if (res.contract_type && res.contract_type.length > 0) {
|
|
|
+ contractType.value = res.contract_type.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ if (res.account_currency && res.account_currency.length > 0) {
|
|
|
+ accountCurrency.value = res.account_currency.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ if (res.trade_mode && res.trade_mode.length > 0) {
|
|
|
+ tradeMethods.value = res.trade_mode.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ if (res.shipping_method && res.shipping_method.length > 0) {
|
|
|
+ shippingMethod.value = res.shipping_method.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ if (res.unit && res.unit.length > 0) {
|
|
|
+ productUnit.value = res.unit.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ });
|
|
|
proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
corporationList.value = res.rows.map((item) => {
|
|
|
return {
|
|
@@ -517,10 +511,7 @@ const clickDownload = () => {
|
|
|
};
|
|
|
const statistics = (label, index) => {
|
|
|
let num = 0;
|
|
|
- if (
|
|
|
- printDetails.value.productInfoList &&
|
|
|
- printDetails.value.productInfoList.length > 0
|
|
|
- ) {
|
|
|
+ if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
|
|
|
printDetails.value.productInfoList.map((item) => {
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
@@ -531,10 +522,7 @@ const statistics = (label, index) => {
|
|
|
};
|
|
|
const statisticsTwo = (label, index) => {
|
|
|
let num = 0;
|
|
|
- if (
|
|
|
- printDetails.value.contractProjectList &&
|
|
|
- printDetails.value.contractProjectList.length > 0
|
|
|
- ) {
|
|
|
+ if (printDetails.value.contractProjectList && printDetails.value.contractProjectList.length > 0) {
|
|
|
printDetails.value.contractProjectList.map((item) => {
|
|
|
if (item[label]) {
|
|
|
num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
|
|
@@ -545,15 +533,8 @@ const statisticsTwo = (label, index) => {
|
|
|
};
|
|
|
const computeScale = (item) => {
|
|
|
let text = 0;
|
|
|
- if (
|
|
|
- item.sumClaimMoney &&
|
|
|
- Number(item.sumClaimMoney) > 0 &&
|
|
|
- item.amountCNY &&
|
|
|
- Number(item.amountCNY) > 0
|
|
|
- ) {
|
|
|
- text = parseFloat(
|
|
|
- (Number(item.sumClaimMoney) / Number(item.amountCNY)) * 100
|
|
|
- ).toFixed(2);
|
|
|
+ if (item.sumClaimMoney && Number(item.sumClaimMoney) > 0 && item.amountCNY && Number(item.amountCNY) > 0) {
|
|
|
+ text = parseFloat((Number(item.sumClaimMoney) / Number(item.amountCNY)) * 100).toFixed(2);
|
|
|
}
|
|
|
return text + "%";
|
|
|
};
|
|
@@ -583,8 +564,7 @@ const openDetails = (row) => {
|
|
|
const printObj = ref({
|
|
|
id: "printMe",
|
|
|
popTitle: "",
|
|
|
- extraCss:
|
|
|
- "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
+ extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
|
|
|
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
|
|
|
});
|
|
|
const clickAlteration = (row) => {
|