新增合同页面

master
xy 2 years ago
parent a4e20724fb
commit 43f887fcfd

@ -0,0 +1,13 @@
# just a flag
ENV = 'development'
# base api
VUE_APP_DOMIAN = http://hjjc-hdcontract-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://hjjc-hdcontract-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API =
VUE_APP_OUT_Book = http://hjjc-book-service-test.ali251.langye.net
VUE_APP_OUT_GDZC = http://hjjc-szemcgdzc.ali251.langye.net
VUE_APP_OUT_OLD = http://hjjc-szemcold-test.ali251.langye.net
VUE_APP_OUT_URL = http://192.168.60.18:2021
VUE_APP_OUT_GOODS = http://hjjc-szemc_goods-test.ali251.langye.net
VUE_APP_OLD_OA = http://192.168.0.66:16667

@ -0,0 +1,22 @@
# just a flag
ENV = 'production'
# base api
VUE_APP_DOMIAN=http://192.168.0.66:9001/
VUE_APP_UPLOAD_API = http://192.168.00.66:9001/api/admin/upload-file
VUE_APP_BASE_API = ''
VUE_APP_OUT_Book = http://192.168.0.66:9002/
VUE_APP_OUT_GDZC = http://192.168.0.66:17777
VUE_APP_OUT_OLD = http://192.168.0.66
VUE_APP_OUT_URL = http://192.168.60.18:2021
VUE_APP_OLD_OA = http://192.168.0.66:16667
VUE_APP_OUT_GOODS = http://hjjc-szemc_goods-test.ali251.langye.net
#
#VUE_APP_DOMIAN = http://hjjc-hdcontract-test.ali251.langye.net
#VUE_APP_UPLOAD_API = http://hjjc-hdcontract-test.ali251.langye.net/api/admin/upload-file
#VUE_APP_BASE_API =
#VUE_APP_OUT_Book = http://hjjc-book-service-test.ali251.langye.net
#VUE_APP_OUT_GDZC = http://hjjc-szemcgdzc.ali251.langye.net
#VUE_APP_OUT_OLD = http://hjjc-szemcold-test.ali251.langye.net
#VUE_APP_OUT_GOODS = http://hjjc-szemc_goods-test.ali251.langye.net

@ -4,5 +4,13 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'
VUE_APP_DOMIAN = http://hjjc-hdcontract-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://hjjc-hdcontract-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API =
VUE_APP_OUT_Book = http://hjjc-book-service-test.ali251.langye.net
VUE_APP_OUT_GDZC = http://hjjc-szemcgdzc.ali251.langye.net
VUE_APP_OUT_OLD = http://hjjc-szemcold-test.ali251.langye.net
VUE_APP_OUT_URL = http://192.168.60.18:2021
VUE_APP_OUT_GOODS = http://hjjc-szemc_goods-test.ali251.langye.net
VUE_APP_OLD_OA = http://192.168.0.66:16667

@ -5,6 +5,7 @@
"author": "Pan <panfree23@gmail.com>",
"scripts": {
"dev": "vue-cli-service serve",
"dev:prod": "vue-cli-service serve --mode production",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",

@ -9,11 +9,12 @@ export function getContract(params,noloading = false){
})
}
export function addContrant(data){
export function addContrant(data,noloading=false){
return request({
method:"post",
url:'/api/admin/contract/store',
data
data,
noloading
})
}
@ -45,7 +46,8 @@ export function checkContractName(params){
return request({
method:'get',
url:'/api/admin/contract/check-name',
params
params,
noloading: true
})
}

@ -4,6 +4,7 @@ export function getOatoken(params){
return request({
method:'get',
url:'/api/admin/oa/get-oa-token',
params
params,
noloading: true
})
}

@ -30,7 +30,8 @@ export function getInfo(token) {
return request({
url: '/api/admin/auth/me',
method: 'post',
params: { token }
params: { token },
noloading: true
})
}
@ -45,6 +46,7 @@ export function getAuthMenu(token) {
return request({
url: '/api/admin/auth/permissions',
method: 'get',
params: { token }
params: { token },
noloading: true
})
}

@ -3,6 +3,7 @@
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */
}
@primary-color: #338de3;
.el-pager li{
font-weight: 100;
margin-right: 9px;
@ -11,7 +12,7 @@
min-width: 28px;
}
.el-pager li.active,.el-pager li:hover{
background: #ed4014;
background: #338de3;
color: white;
}
.el-pagination__editor.el-input .el-input__inner{
@ -25,7 +26,7 @@
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@media (print), (prefers-reduced-motion) {
.animated {
-webkit-animation: unset !important;
@ -34,35 +35,35 @@
transition: none !important;
}
}
@-webkit-keyframes fadeInDown {
from {
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
@ -72,4 +73,4 @@
}
.ivu-form-item-content{
text-align: left;
}
}

@ -148,6 +148,7 @@ export default {
}
return (
<el-form
class="xy-dialog-form"
style={title.length === 0 ? {'margin-top':'32px'} : {}}
ref="elForm"
props={{
@ -207,67 +208,6 @@ export default {
width: 140px;
text-align: right;
}
.xy-table-item-min{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(分钟)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(元)'
}
::v-deep .el-input__clear{
padding: 0 6px;
position: relative;
right: 30px;
z-index: 2;
}
}
.xy-table-item-price-wan{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'(万元)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price-percent{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'%'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.vertical-center-modal{
display: flex;
@ -297,16 +237,80 @@ export default {
}
}
.el-form-item{
flex-shrink: 0;
flex-basis: 50%;
}
.el-form-item__error{
white-space: nowrap;
word-break: keep-all !important;
top: 100% !important;
left: calc(100% - 80px) !important;
transform: translateX(-100%);
.xy-dialog-form {
.el-form-item{
flex-shrink: 0;
flex-basis: 50%;
}
.el-form-item__error{
white-space: nowrap;
word-break: keep-all !important;
top: 100% !important;
left: calc(100% - 80px) !important;
transform: translateX(-100%);
}
.xy-table-item-price-wan{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'(万元)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price-percent{
position: relative;
&::after{
padding: 0 6px;
position: absolute;
right: 0;
top: 0;
content:'%'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.xy-table-item-price{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(元)'
}
::v-deep .el-input__clear{
padding: 0 6px;
position: relative;
right: 30px;
z-index: 2;
}
}
.xy-table-item-min{
position: relative;
&::after{
z-index: 1;
position: absolute;
right: 0;
top: 0;
content:'(分钟)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
}
</style>

@ -209,12 +209,6 @@ export default {
immediate: true,
},
},
beforeRouteEnter(to,from,next){
document.getElementsByTagName('iframe').forEach(dom => {
dom.onload = null;
})
next()
},
created() {
let gdzcIframe = document.createElement('iframe');
gdzcIframe.src = `${process.env.VUE_APP_OUT_GDZC}/member/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}`

@ -132,12 +132,6 @@ export default {
immediate: true,
},
},
beforeRouteEnter(to,from,next){
document.getElementsByTagName('iframe').forEach(dom => {
dom.onload = null;
})
next()
}
};
</script>

@ -26,6 +26,9 @@ router.beforeEach(async (to, from, next) => {
document.title = getPageTitle(to.meta.title)
if (to.query.code) {
// let hash = window.location.hash
// let query = hash.split('?')[1]?.split('&')
// let code = query?.find(i => /^code/.test(i))?.split('=')[1]
removeToken()
const res = await loginOssV2({
code: to.query.code

File diff suppressed because it is too large Load Diff

@ -245,31 +245,13 @@
</Option>
</Select>
</div>
<!-- <div>-->
<!-- <span style="padding: 0 6px; word-break: keep-all">-->
<!-- 请示流程状态-->
<!-- </span>-->
<!-- <Select-->
<!-- v-model="select.req_status"-->
<!-- clearable-->
<!-- placeholder="请选择"-->
<!-- style="width: 100px"-->
<!-- >-->
<!-- <Option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- >{{ item.label }}-->
<!-- </Option>-->
<!-- </Select>-->
<!-- </div>-->
</div>
</xy-selectors>
<Button
style="margin-left: 10px"
type="primary"
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : isShowAdd = true"
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : $router.push('/contract/contractEdit')"
>新增</Button
>
<Button style="margin-left: 10px" type="primary" @click="getContracts"
@ -303,10 +285,10 @@
>
<template slot-scope="scope">
<div class="slot-btns">
<template v-if="(scope.row.status === 2 && scope.row.is_end === 0) || (!scope.row.is_contract && ((scope.row.purchase_way && scope.row.purchase_way.value === '网上商城') || scope.row.purchase_status === 3))">
<template v-if="scope.row.is_assurance == 1 || (!scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value === '网上商城' && scope.row.purchase_status === 3)">
<template v-if="scope.row.FLOWSTATUS['zhifu'].isEnabled()">
<template v-if="scope.row.is_assurance === 1">
<!-- 如果是 履约文件-->
<template v-if="scope.row.assurance_status == 1 || (!scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value === '网上商城' && scope.row.purchase_status === 3)">
<template v-if="scope.row.assurance_status === 1">
<!-- 那么必须财务审核通过-->
<Button
class="slot-btns-item"
@ -319,8 +301,6 @@
].isShowPaymentRegistration = true)
"
>
<!-- paying(scope.row) @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
</Button>
</template>
@ -336,16 +316,11 @@
'paymentRegistration'
].isShowPaymentRegistration = true)
"
>
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
>付款登记
</Button>
</template>
</template>
<template
v-if="(scope.row.status === 1 && scope.row.join_status === 3 && !/contractLedger/g.test($route.path)) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')"
>
<template v-if="scope.row.FLOWSTATUS['qianding'].isEnabled()">
<Button
class="slot-btns-item"
size="small"
@ -358,17 +333,7 @@
签订合同
</Button>
</template>
<!-- 采购完成 -->
<template
v-if="
(scope.row.invite_status === 1 &&
scope.row.purchase_status === 3 &&
(scope.row.purchase_way
? scope.row.purchase_way.remark === 'true'
: false) &&
!scope.row.is_substitute) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')
"
>
<template v-if="scope.row.FLOWSTATUS['zhaobiao'].isEnabled()">
<Button
class="slot-btns-item"
size="small"
@ -377,68 +342,151 @@
$refs['biddingUpload'].setId(scope.row.id),
$refs['biddingUpload'].show()
"
>招标审查</Button
>招标审查</Button
>
</template>
<!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>-->
<!-- <template-->
<!-- v-if="-->
<!-- scope.row.req_status === 1 &&-->
<!-- scope.row.is_plan === 0 &&-->
<!-- !scope.row.is_substitute-->
<!-- "-->
<!-- >-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="askProcess(scope.row)"-->
<!-- >请示流程-->
<!-- </Button>-->
<!-- </template>-->
<!-- 中标-->
<!-- <template v-if="false">-->
<!-- <Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button>-->
<!-- </template>-->
<!--不需要走采购流程那么直接就是会签如果采购方式不需要招标的也是直接会签-->
<template
v-if="
((scope.row.join_status === 1 &&
(scope.row.invite_status === 3 ||
((scope.row.purchase_way
? scope.row.purchase_way.remark === 'false'
: false) &&
scope.row.purchase_status === 3))) ||
(scope.row.is_substitute && scope.row.join_status === 1)) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')
"
>
<template v-if="scope.row.FLOWSTATUS['shenpi'].isEnabled()">
<Button
class="slot-btns-item"
size="small"
type="primary"
@click="signProcess(scope.row)"
>合同审批
>合同审批
</Button>
</template>
<template
v-if="
scope.row.is_simple !== 1 &&
scope.row.purchase_status === 1 &&
((scope.row.req_status === 3 && scope.row.is_plan === 0) ||
scope.row.is_plan === 1) &&
!scope.row.is_substitute
"
>
<template v-if="scope.row.FLOWSTATUS['caigou'].isEnabled()">
<Button
class="slot-btns-item"
size="small"
type="primary"
@click="buyProcess(scope.row)"
>采购流程
>采购流程
</Button>
</template>
<!-- <template v-if="((scope.row.status === 2) ||-->
<!-- (!scope.row.is_contract && (scope.row.is_simple)) ||-->
<!-- ((scope.row.purchase_way && scope.row.purchase_way.value === '网上商城')-->
<!-- && scope.row.purchase_status === 3) ) && scope.row.is_end === 0">-->
<!-- <template v-if="scope.row.is_assurance == 1">-->
<!-- &lt;!&ndash; 如果是 履约文件&ndash;&gt;-->
<!-- <template v-if="scope.row.assurance_status == 1">-->
<!-- &lt;!&ndash; 那么必须财务审核通过&ndash;&gt;-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="-->
<!-- $refs['paymentRegistration'].getContract(scope.row),-->
<!-- ($refs[-->
<!-- 'paymentRegistration'-->
<!-- ].isShowPaymentRegistration = true)-->
<!-- "-->
<!-- >-->
<!-- &lt;!&ndash; paying(scope.row) @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"&ndash;&gt;-->
<!-- 付款登记-->
<!-- </Button>-->
<!-- </template>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="-->
<!-- $refs['paymentRegistration'].getContract(scope.row),-->
<!-- ($refs[-->
<!-- 'paymentRegistration'-->
<!-- ].isShowPaymentRegistration = true)-->
<!-- "-->
<!-- >-->
<!-- &lt;!&ndash; @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"&ndash;&gt;-->
<!-- 付款登记-->
<!-- </Button>-->
<!-- </template>-->
<!-- </template>-->
<!-- <template-->
<!-- v-if="-->
<!-- (scope.row.status === 1 && scope.row.join_status === 3 && !/contractLedger/g.test($route.path)) &&-->
<!-- (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')"-->
<!-- >-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="-->
<!-- ($refs['contractSign'].isShow = true),-->
<!-- ($refs['contractSign'].contractId = scope.row.id)-->
<!-- "-->
<!-- >-->
<!-- 签订合同-->
<!-- </Button>-->
<!-- </template>-->
<!-- &lt;!&ndash; 采购完成 &ndash;&gt;-->
<!-- <template-->
<!-- v-if="-->
<!-- (scope.row.invite_status === 1 &&-->
<!-- scope.row.purchase_status === 3 &&-->
<!-- (scope.row.purchase_way-->
<!-- ? scope.row.purchase_way.remark === 'true'-->
<!-- : false) &&-->
<!-- !scope.row.is_substitute) &&-->
<!-- (scope.row.is_contract && scope.row.purchase_way-->
<!-- && scope.row.purchase_way.value !== '网上商城')-->
<!-- "-->
<!-- >-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="-->
<!-- $refs['biddingUpload'].setId(scope.row.id),-->
<!-- $refs['biddingUpload'].show()-->
<!-- "-->
<!-- >招标审查</Button-->
<!-- >-->
<!-- </template>-->
<!-- &lt;!&ndash;不需要走采购流程那么直接就是会签如果采购方式不需要招标的也是直接会签&ndash;&gt;-->
<!-- <template-->
<!-- v-if="-->
<!-- scope.row.is_contract &&-->
<!-- ((scope.row.join_status === 1 &&-->
<!-- (scope.row.invite_status === 3 ||-->
<!-- ((scope.row.purchase_way-->
<!-- ? scope.row.purchase_way.remark === 'false'-->
<!-- : false) &&-->
<!-- scope.row.purchase_status === 3))) ||-->
<!-- (scope.row.is_substitute && scope.row.join_status === 1))-->
<!-- && (scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')-->
<!-- "-->
<!-- >-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="signProcess(scope.row)"-->
<!-- >合同审批-->
<!-- </Button>-->
<!-- </template>-->
<!-- <template-->
<!-- v-if="-->
<!-- scope.row.is_simple !== 1 &&-->
<!-- scope.row.purchase_status === 1 &&-->
<!-- ((scope.row.req_status === 3 && scope.row.is_plan === 0) ||-->
<!-- scope.row.is_plan === 1) &&-->
<!-- !scope.row.is_substitute-->
<!-- "-->
<!-- >-->
<!-- <Button-->
<!-- class="slot-btns-item"-->
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="buyProcess(scope.row)"-->
<!-- >采购流程-->
<!-- </Button>-->
<!-- </template>-->
<Poptip trigger="hover" placement="bottom" transfer>
<Button ghost size="small" type="primary">更多</Button>
@ -1520,66 +1568,6 @@ export default {
{
label: "采购流程",
multiHd: [
// {
// label: "",
// width: 140,
// prop: "req_status",
// formatter: (cell, data, value) => {
// if (cell.is_substitute) {
// return "";
// }
// if (cell.is_plan === 1) {
// return "";
// }
// switch (value) {
// case 1:
// return "";
// break;
// case 2:
// return "";
// break;
// case 3:
// return "";
// break;
// default:
// return "";
// break;
// }
// },
// customFn:row => {
// const getDate = (value) => {
// if (row.is_substitute) {
// return "";
// }
// if (row.is_plan === 1) {
// return "";
// }
// switch (value) {
// case 1:
// return "";
// break;
// case 2:
// return "";
// break;
// case 3:
// return "";
// break;
// default:
// return "";
// break;
// }
// }
// return (
// <div>
// <span>{ getDate(row.purchase_status) }</span>
// <br/>
// {
// (row.purchase_status === 1 || row.is_substitute || row.is_plan === 1) ? '' : <a style="color: #333" on={{['click']:this.toOaDetail}}></a>
// }
// </div>
// )
// }
// },
{
label: "采购业务审批流程",
width: 158,
@ -1664,7 +1652,7 @@ export default {
width: 145,
prop: "join_status",
customFn:row => {
if (row.is_simple || !row.is_contract) {
if (row.is_simple || !row.is_contract || (row.purchase_way && row.purchase_way.value === '网上商城')) {
return (<span></span>);
}
const getDate = (value) => {
@ -1688,7 +1676,7 @@ export default {
<span>{ getDate(row.join_status) }</span>
<br/>
{
(row.is_simple || row.join_status === 1) ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a>
row.join_status === 1 ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a>
}
</div>
)
@ -2343,7 +2331,7 @@ export default {
}
}
if (column.property === "join_status") {
if (row.is_simple) {
if (row.is_simple || (row.purchase_way && row.purchase_way.value === '网上商城')) {
return {
color: "rgb(140,140,140)",
};
@ -2622,7 +2610,7 @@ export default {
this.select.is_export = 0;
return;
}
res.list.data.forEach(i => this.handleContractFlow(i))
this.list = res.list.data;
this.total = res.list.total;
this.tableTotal.fundLogTotal = res.fund_log_total;
@ -2633,7 +2621,7 @@ export default {
.toFixed(2)
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
console.log(this.list)
//oa
if (isopenOa) {
@ -2645,9 +2633,8 @@ export default {
res.list.data[0].is_plan === 1) &&
!res.list.data[0].is_substitute
) {
await this.buyProcess(res.list.data[0])
}
await this.buyProcess(res.list.data[0])
}
}
},
@ -2857,6 +2844,88 @@ export default {
selectionChange(selection) {
this.selections = Array.from(new Set(selection));
},
//
handleContractFlow (item) {
class Flow {
status = 0
executable = false
constructor(status=0, executable=false) {
this.status = status
this.executable = executable
}
setStatus (status) {
this.status = status
}
setExecutable (executable) {
if (typeof executable === 'boolean') {
this.executable = executable
}
}
getStatus () {
return this.status
}
isEnabled () {
return this.executable && this.status === 1
}
}
//012312
let flowStatus = {
"caigou": new Flow(),
"zhaobiao": new Flow(),
"shenpi": new Flow(),
"qianding": new Flow(),
"zhifu": new Flow()
}
if (item.is_simple !== 1 && !item.is_substitute) {
//
flowStatus["caigou"].setStatus(item.purchase_status)
if (item.purchase_status === 1) {
//
if (item.is_plan === 1 || (item.is_plan === 0 && item.req_status === 3)) {
//
flowStatus["caigou"].setExecutable(true)
}
}
}
if (item.purchase_way?.value !== '网上商城' && item.is_contract && !item.is_substitute && item.purchase_way?.remark === 'true') {
//
flowStatus["zhaobiao"].setStatus(item.invite_status)
if (item.invite_status === 1 && item.purchase_status === 3) {
//
flowStatus["zhaobiao"].setExecutable(true)
}
}
if (item.is_contract && item.purchase_way?.value !== "网上商城") {
//
flowStatus["shenpi"].setStatus(item.join_status)
if (item.join_status === 1 && (item.invite_status === 3 ||
(item.purchase_way?.remark === 'false' && item.purchase_status === 3) ||
item.is_substitute)) {
//
flowStatus["shenpi"].setExecutable(true)
}
}
if (item.is_contract && item.purchase_way?.value !== "网上商城" && !/contractLedger/g.test(this.$route.path)) {
flowStatus["qianding"].setStatus(item.status)
if (item.join_status === 3 && item.status === 1) {
flowStatus["qianding"].setExecutable(true)
}
}
if (item.is_end === 0) {
flowStatus["zhifu"].setStatus(1)
//
if ((item.purchase_way?.value === "网上商城" && item.purchase_status === 3) ||
item.status === 2 ||
(!item.is_contract && item.is_simple)) {
//
flowStatus["zhifu"].setExecutable(true)
}
}
item.FLOWSTATUS = flowStatus
}
},
computed: {
purchaseWayFormat() {
@ -2907,66 +2976,18 @@ export default {
this.getDepartment();
this.getPurchaseWay();
this.getMoneyWay();
updateFlow().then(_ => this.getContracts())
this.getContracts();
//
window.onfocus = async () => {
await updateFlow();
await this.getContracts(false,true)
// if (this.nowContract?.tbname && this.nowContract?.id) {
// let select = {};
// select["tbname"] = this.nowContract.tbname;
// switch (this.nowContract.tbname) {
// case "caigou":
// select["out_caigou_id"] = this.nowContract.id;
// break;
// case "hetong":
// select["out_contract_id"] = this.nowContract.id;
// break;
// case "zhaobiao":
// select["out_zhaobiao_id"] = this.nowContract.id;
// break;
// }
// const res = await httpCurl(select);
// let flowIdMap = new Map([
// ["caigou", 8],
// ["hetong", 9],
// ["zhaobiao", 30],
// ]);
// let flowTypeMap = new Map([
// ["caigou", 2],
// ["hetong", 3],
// ["zhaobiao", 27],
// ]);
// let getStatus = (status) => {
// if (status === "end") {
// return 1;
// }
// if (Number(status)) {
// return 0;
// }
// return -1;
// };
// await updateStatus({
// flow_id: flowIdMap.get(this.nowContract.tbname),
// flow_type: flowTypeMap.get(this.nowContract.tbname),
// out_contract_id: this.nowContract.id,
// status: getStatus(res.flow?.current_step),
// },true);
// await this.getContracts(false,true);
// }
};
},
created() {
this.getBudgets();
this.select.keyword = this.$route.query.keyword;
// iframe = document.createElement("iframe");
// iframe.src = `${process.env.VUE_APP_OUT_OLD}/login/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}`;
// iframe.style.display = "none";
// document.body.appendChild(iframe);
},
destroyed() {
window.onfocus = null;
//document.body.removeChild(iframe);
},
};
</script>

@ -25,8 +25,8 @@ module.exports = {
* In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
outputDir: '/Users/mac/Documents/Work/s-苏州环境监测中心/code/hjjc-workbench-service/public/admin/',
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: './dist',
assetsDir: 'static',
lintOnSave: false,
productionSourceMap: false,
@ -38,10 +38,6 @@ module.exports = {
sass:{
prependData: '@import "@/styles/index.scss";'
}
},
extract: { // 打包后css文件名称添加时间戳
filename: `static/css/[name].${timeStamp}.css`,
chunkFilename: `static/css/chunk.[id].${timeStamp}.css`
}
},
devServer: {
@ -84,10 +80,6 @@ module.exports = {
alias: {
'@': resolve('src')
}
},
output: {
filename: `static/js/[name]-${timeStamp}.js`,
chunkFilename: `static/js/[name]-${timeStamp}.js`
}
},
chainWebpack(config) {

Loading…
Cancel
Save