lion 2 years ago
parent bf55028988
commit a9fb92bc0d

@ -2,8 +2,9 @@
ENV='development'
# base api
#VUE_APP_BASE_API = http://192.168.60.100:9002/
#VUE_APP_UPLOAD_API = http://192.168.60.100:9002/api/admin/upload-file
VUE_APP_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API = http://192.168.60.100:9002/
VUE_APP_UPLOAD_API = http://192.168.60.100:9002/api/admin/upload-file
#VUE_APP_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
#VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:2021

@ -2,7 +2,8 @@
ENV = 'production'
# base api
#VUE_APP_BASE_API = http://192.168.60.100:9002/
#VUE_APP_UPLOAD_API = http://192.168.60.100:9002/api/admin/upload-file
VUE_APP_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API = http://192.168.60.100:9002/
VUE_APP_UPLOAD_API = http://192.168.60.100:9002/api/admin/upload-file
#VUE_APP_BASE_API = http://hd-wuziguanli-test.ali251.langye.net/
#VUE_APP_UPLOAD_API = http://hd-wuziguanli-test.ali251.langye.net/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:2021

@ -7,3 +7,19 @@ export function index(params) {
params:params
})
}
export function show(params) {
return request({
method: "get",
url: "/api/admin/other/contract-detail",
params
})
}
export function getOatoken(params) {
return request({
method: "get",
url: "/api/admin/other/get-oa-token",
params
})
}

@ -1,7 +1,6 @@
<script>
export default {
props:{
zIndex:Number,
type:{
type:String,
default:"normal"
@ -42,46 +41,20 @@ export default {
},
methods: {
footerRender(){
if(this.type === 'form'){
return (
<div>
<Button ghost type="primary" on-click={this.reset}>重置</Button>
<Button type="primary" on-click={this.submit}>{this.okText || '确定'}</Button>
</div>
)
}
if(this.type === 'normal'){
return (
<div>
<Button ghost type="primary" on-click={()=>{this.$emit('update:isShow',false)}}>取消</Button>
<Button type="primary" on-click={()=>{this.$emit('on-ok')}}>{this.okText || '确定'}</Button>
</div>
)
}
return (
<div>
<Button ghost type="primary" on-click={this.reset}>重置</Button>
<Button type="primary" on-click={this.submit}>确定</Button>
</div>
)
},
showChange(e){
this.$emit('update:isShow',e)
this.$emit('on-visible-change',e)
},
validate(){
return new Promise((resolve,reject)=>{
this.$refs['elForm'].validate().then(res=>{
if(res){
resolve(res)
}else{
reject(res)
}
}).catch(err=>{
reject(err)
this.$Message.warning({
content:'请填写完整信息',
duration:1
})
})
})
cancelClick(){
this.$emit('update:isShow',false)
},
reset(){
this.$emit('reset')
if(this.type === 'normal'){
return
}
@ -93,26 +66,15 @@ export default {
}
this.$refs['elForm'].validate().then(res=>{
if(res)this.$emit('submit')
}).catch(err => {
}).catch(err=>{
this.$Message.warning({
content: "请填写完整信息",
background: true,
duration: 1
content:'请填写完整信息',
duration:1
})
})
},
okClick(){
this.$emit('on-ok')
},
clearValidate() {
this.$refs['elForm'].clearValidate();
}
},
watch:{
isShow(val){
if(!val && this.type === 'form'){
this.reset()
}
}
},
render(h) {
@ -126,10 +88,9 @@ export default {
footer slot:
footerContent
*/
const {okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
const {cancelClick,okText,okClick,footerRender,width,type,$scopedSlots,rules,form,showChange,isShow,title} = this
return (
<Modal
z-index={this.zIndex}
ok-text={okText}
class-name={'vertical-center-modal'}
width={width}
@ -140,16 +101,14 @@ export default {
default(){
if(type === "form"){
let formItems = []
for(let key in form){
if(form.hasOwnProperty(key) && $scopedSlots[key]){
formItems.push(
<el-form-item
prop={key}>
{eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
</el-form-item>
)
}
}
Object.keys(form).map((key)=>{
formItems.push(
<el-form-item
prop={key}>
{eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
</el-form-item>
)
})
return (
<el-form
style={title.length === 0 ? {'margin-top':'32px'} : {}}
@ -184,19 +143,20 @@ export default {
return (
<div
style={title.length === 0 ? {'margin-top':'32px'} : {}}>
{$scopedSlots.default ? $scopedSlots.default() : ''}
{$scopedSlots.normalContent ? $scopedSlots.normalContent() : ''}
</div>
)
}
},
header(){
if($scopedSlots.headerContent){
return $scopedSlots.headerContent()
}
},
footer(){
{
if(type === 'form' || type === 'normal') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
if(type === 'form') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : footerRender())
if(type === 'normal') return ($scopedSlots.footerContent ? $scopedSlots.footerContent() : (
<div>
<Button ghost type="primary" on-click={cancelClick}>取消</Button>
<Button type="primary" on-click={okClick}>确定</Button>
</div>
))
}
}
}}>
@ -207,55 +167,6 @@ export default {
</script>
<style lang="scss">
.xy-table-item-label{
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{
position: relative;
right: 30px;
z-index: 2;
}
}
.xy-table-item-price-wan{
position: relative;
&::after{
position: absolute;
right: 0;
top: 0;
content:'(万元)'
}
::v-deep .el-input__clear{
position: relative;
right: 46px;
z-index: 2;
}
}
.vertical-center-modal{
display: flex;
align-items: center;
@ -265,22 +176,17 @@ export default {
top: 0;
}
}
.ivu-modal-body::-webkit-scrollbar {
display: none;
}
.ivu-modal-body{
max-height: 65vh !important;
min-height: 300px;
overflow-y: scroll;
overflow-y: auto;
}
::-webkit-scrollbar{display:none}
.xy-table-item{
display: flex;
align-items: center;
padding-right: 80px;
margin-right: 80px;
&-label{
padding: 0 20px;
@ -289,19 +195,11 @@ 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%);
}
.ivu-message{
z-index: 5000 !important;
}
</style>

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4073294 */
src: url('iconfont.woff2?t=1684320683472') format('woff2'),
url('iconfont.woff?t=1684320683472') format('woff'),
url('iconfont.ttf?t=1684320683472') format('truetype');
src: url('iconfont.woff2?t=1687673070337') format('woff2'),
url('iconfont.woff?t=1687673070337') format('woff'),
url('iconfont.ttf?t=1687673070337') format('truetype');
}
.iconfont {
@ -13,6 +13,46 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-iconfontzhizuobiaozhunbduan15:before {
content: "\e6d6";
}
.icon-yingjiyuan:before {
content: "\e631";
}
.icon-tongji:before {
content: "\e661";
}
.icon-navicon-lymxtj:before {
content: "\e658";
}
.icon-ruku:before {
content: "\e632";
}
.icon-kucun:before {
content: "\e63b";
}
.icon-kucunpandian:before {
content: "\e673";
}
.icon-caigoudan:before {
content: "\e633";
}
.icon-guihuan:before {
content: "\e634";
}
.icon-chuzhilishi:before {
content: "\e641";
}
.icon-zhiliangguanli:before {
content: "\e671";
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -171,3 +171,12 @@ export function debounce(func, delay) {
}
}
//金额分隔
export function moneyFormatter(money,precision=2){
return Number(money).toFixed(precision).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
//金额分隔复原
export function moneyRecovery(money){
return parseFloat(money.replace(/[^\d\.-]/g, ""));
}

@ -18,7 +18,7 @@
</lx-header>
</div>
<xy-table :list="list" :total="total" @selection-change="selectionChange" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
<xy-table :list="list" v-loading="loading" :total="total" @selection-change="selectionChange" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
:table-item="table" :auths='[]'>
<template v-slot:btns>
<div></div>
@ -70,6 +70,7 @@
},
data() {
return {
loading:false,
select: {
pageSize: 10,
pageIndex: 1,
@ -237,6 +238,7 @@
this.showcode = false
},
async getindex() {
this.loading = true
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
@ -246,6 +248,7 @@
})
this.list = res.data
this.total = res.total
this.loading = false
},
pageChange(e) {

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width='80' :is-show.sync="isShow" type="form" :title="type === 'add' ? `新增${chukuType}出库` : `编辑${chukuType}出库`" :form="form" :rules="rules" @submit="submit">
<xy-dialog ref="dialog" :width='70' :is-show.sync="isShow" type="form" :title="type === 'add' ? `新增${chukuType}出库` : `编辑${chukuType}出库`" :form="form" :rules="rules" @submit="submit">
<template v-slot:chukushijian>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -101,7 +101,7 @@
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
@click="isShowMingxi=true">新增出库明细</Button>
<xy-table style="width: 75%" :height="260" :is-page="false" :list="mingxiList"
<xy-table style="width: 50%" :height="260" :is-page="false" :list="mingxiList"
:table-item="mingxiTable">
<template v-slot:btns>
<el-table-column label="操作" width="90" header-align="center" align="center">

@ -17,7 +17,7 @@
</lx-header>
</div>
<xy-table :list="list" :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
<xy-table :list="list" v-loading="loading" :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
:table-item="table">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center">
@ -64,6 +64,7 @@
},
data() {
return {
loading:false,
select: {
pageSize: 10,
pageIndex: 1,
@ -129,6 +130,7 @@
},
methods: {
async getindex() {
this.loading = true
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
@ -138,6 +140,7 @@
})
this.list = res.data
this.total = res.total
this.loading = false
},
pageChange(e) {

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width='80' :is-show.sync="isShow" type="form" :title="type === 'add' ? `新增${rukuTypeName}入库` : `编辑${rukuTypeName}入库`" :form="form"
<xy-dialog ref="dialog" :width='70' :is-show.sync="isShow" type="form" :title="type === 'add' ? `新增${rukuTypeName}入库` : `编辑${rukuTypeName}入库`" :form="form"
:rules="rules" @submit="submit">
<template v-slot:caigouhetong v-if="form.rukuleixing=='采购'">
@ -105,7 +105,7 @@
@click="isShowMingxi=true">新增入库明细</Button>
<!-- <Button v-if="form.rukuleixing==''" type="primary" icon="md-add" style="margin-bottom: 10px"
@click="isShowMingxi=true">新增入库明细</Button> -->
<xy-table style="width: 75%" :height="260" :is-page="false" :list="mingxiList" :table-item="mingxiTable">
<xy-table style="width: 60%" :height="260" :is-page="false" :list="mingxiList" :table-item="mingxiTable">
<template v-slot:btns>
<el-table-column label="操作" width="90" header-align="center" align="center">
<template v-slot:default="scope">
@ -246,7 +246,7 @@
</Modal>
<!-- 选择采购合同 -->
<Modal v-model="isShowHt" title="合同选择">
<Modal v-model="isShowHt" title="合同选择" width='70%' @on-cancel='htCancel' @on-ok='htComfirm'>
<div class="searchCompanys">
<el-input type="text" @keyup.enter.native="getHt" v-model="htkeyword" placeholder="请输入关键词查找"></el-input>
<el-button type="primary" @click="getHt"></el-button>
@ -256,7 +256,7 @@
<Page :current="htPageIndex" :total="htTotal" simple
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="htPageChange" />
</Modal>
<detailContract ref='detailContract'></detailContract>
</div>
</template>
@ -273,8 +273,11 @@
Message
} from 'element-ui'
import isEqual from '@/utils/index.js'
import detailContract from "../component/detailContract.vue"
export default {
components:{
detailContract
},
data() {
return {
isShow: false,
@ -410,6 +413,7 @@
htPageIndex: 1,
htkeyword: '',
htTotal: 0,
editHt:'',
htColumns: [{
width: 60,
_isChecked: false,
@ -438,9 +442,31 @@
},{
title:'类型',
key:'type_name',
width:100
},{
title:'状态',
key:'status_name'
key:'status_name',
width:100
},{
title:'查看',
key:'',
width:100,
render: (h, params) => {
return h('span', {
style: {
color:'#0077CC',
cursor:'pointer'
},
on: {
'click': (e) => {
console.log("click",params.row.id)
this.$refs['detailContract'].getDetail(params.row.id)
this.$refs['detailContract'].isShowDetail = true
// @click=","
}
}
},'查看详情')
}
}]
}
},
@ -458,16 +484,24 @@
page: this.htPageIndex,
keyword:this.htkeyword,
type:2,
status:2
})
for (var m of res.data) {
for (var m of res.list.data) {
m.isSelect = false
m.type_name = '货物'
m.type_name = m.type==1?'服务':(m.type==2?'货物':(m.type==3?'工程':'其他'))
m.status_name = m.status==1?'待签订':(m.status==2?'已签订':'')
}
this.htList = res.data
console.log(res.list.data)
this.htList = res.list.data
this.htTotal = res.total
// this.hetongoptions = res.data
},
htCancel(){
this.htList.forEach((items) => {
this.$set(items, 'isSelect', false)
});
this.form.caigouhetong = this.editHt
},
htSelect(e) {
this.htList.forEach((items) => {
this.$set(items, 'isSelect', false)
@ -475,7 +509,17 @@
this.$set(items, 'isSelect', true)
}
});
this.form.caigouhetong = e.name
},
htComfirm(){
console.log("123")
this.htList.forEach((items) => {
if(items.isSelect==true){
this.form.caigouhetong = items.name
this.editHt = items.name
}
});
},
htPageChange(e) {
console.log("e", e)
@ -720,6 +764,7 @@
beizhu: res?.beizhu,
rukumingxi: ''
}
this.editHt = res?.caigouhetong
this.mingxiList = res.id_stocks_items_stocks_id_relation
},
//

@ -0,0 +1,475 @@
<template>
<div v-if="detail">
<!-- 合同详情-->
<xy-dialog :is-show.sync="isShowDetail" type="normal" title="详情" class="contract-detail">
<template v-slot:normalContent>
<div class="base-info">
<div class="base-info-title">项目基本信息</div>
<div class="base-info-item">
<div class="base-info-item-title">项目名称</div>
<div class="base-info-item-content">{{detail.name}}</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">项目类型</div>
<div class="base-info-item-content">{{typeFormatter(detail.type)}}</div>
</div>
<div style="display: flex;justify-content: space-between;">
<div class="base-info-item" style="flex-basis: 50%">
<div class="base-info-item-title">采购形式</div>
<div class="base-info-item-content">{{detail.purchase_way?detail.purchase_way.value:'无'}}</div>
</div>
<div class="base-info-item" style="flex-basis: 50%">
<div class="base-info-item-title">采购方式</div>
<div class="base-info-item-content">{{detail.purchase_type?detail.purchase_type.value:'无'}}</div>
</div>
</div>
<div style="display: flex;justify-content: space-between;">
<div class="base-info-item" style="flex-basis: 50%">
<div class="base-info-item-title">签订时间</div>
<div class="base-info-item-content">{{detail.date}}</div>
</div>
<div class="base-info-item" style="flex-basis: 50%">
<div class="base-info-item-title">服务时间</div>
<div class="base-info-item-content">{{detail.start_date}}{{detail.end_date}}</div>
</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">项目预算</div>
<div class="base-info-item-content">{{moneyFormat(detail.plan_price)}}</div>
<div class="base-info-item-unit">()</div>
</div>
<div class="base-info-item">
<div class="base-info-item-title">资金渠道</div>
<div class="base-info-item-content">{{moneyWayFormatter(detail.money_way_detail)}}</div>
</div>
</div>
<div class="link-budget-plan">
<div class="link-budget-plan-title">关联预算计划</div>
<xy-table :height="260" :isPage='false' :table-item="linkBudgetPlanTable" :show-index="false" :list="detail.plans">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</div>
<div class="sign-info">
<div class="sign-info-title">签订信息</div>
<div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div>
<div class="sign-info-item-content">{{moneyFormat(detail.money)}}</div>
<div class="sign-info-item-unit"></div>
</div>
<div style="display: flex;justify-content: space-between">
<div class="sign-info-item" style="flex-basis: 50%">
<div class="sign-info-item-title">承包商\供应商</div>
<div class="sign-info-item-content">{{detail.supply}}</div>
</div>
<div class="sign-info-item" style="flex-basis: 50%">
<div class="sign-info-item-title">执行部门</div>
<div class="sign-info-item-content">{{detail.carry_department}}</div>
</div>
</div>
</div>
<div class="related-processes">
<div class="related-processes-title">相关流程进展查看</div>
<div class="related-processes-item">
<div @click="seeBuyProcess" :style="{'color':detail.purchase_last_flow_id ? 'green' : 'red'}">采购流程查看</div>
<div @click="seeSignProcess" :style="{'color':detail.join_last_flow_id ? 'green' : 'red'}">合同会签流程查看</div>
<template v-if="detail.purchase_way?detail.purchase_way.remark === 'true':false">
<div @click="seeBidding" :style="{'color':detail.invite_last_flow_id ? 'green' : 'red'}">招标审批流程查看</div>
</template>
<template v-if="detail.is_plan != 1">
<div @click="seeAskProcess" :style="{'color':detail.req_last_flow_id ? 'green' : 'red'}">请示流程查看</div>
</template>
</div>
</div>
<div class="journal">
<div class="journal-title">日志</div>
<xy-table :height="240" :isPage='false' :table-item="journalTable" :list="detail.log" :show-index="false">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</div>
</template>
<template v-slot:footerContent>
<Button type="primary" @click='isShowDetail=false'>关闭</Button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
show as detailContract,
getOatoken
} from "@/api/contract.js";
import {
parseTime
} from "@/utils"
import {
Message
} from "element-ui";
import {
moneyFormatter
} from "@/utils"
import {
getparameter
} from "@/api/system/dictionary";
export default {
components: {
},
data() {
return {
window: {
width: 0,
height: 0,
top: 0,
left: 0
},
//
id: '',
detail: null,
isShowDetail: false,
linkBudgetPlanTable: [{
label: "ID",
sortable: false,
prop: 'id',
width: 130
},
{
label: "类型",
width: 100,
sortable: false,
customFn: (row) => {
const typeSwitch = (type) => {
{
let res = this.planTypes.filter(item => {
return item.id === type
})
return res[0]?.value || '未知'
}
}
return ( <
div >
<
Tag color = "primary" > {
typeSwitch(row.type)
} <
/Tag> <
/div>
)
}
},
{
label: "项目",
width: 140,
sortable: false,
prop: 'name'
},
{
label: "金额",
sortable: false,
prop: 'money',
align: 'right',
minWidth: 200,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label: '使用金额',
sortable: false,
prop: 'useMoney',
align: 'right',
minWidth: 200,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
}
],
journalTable: [{
label: 'ID',
sortable: false,
prop: 'id'
},
{
label: "日志类型",
sortable: false,
prop: 'type'
},
{
label: "日志内容",
sortable: false,
prop: 'remark'
},
{
label: "操作人",
sortable: false,
prop: 'admin.name'
},
{
label: "时间",
sortable: false,
prop: 'created_at',
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}')
}
}
],
planTypes: [],
}
},
methods: {
async getPlanTypes() {
const res = await getparameter({
number: 'money_way'
})
this.planTypes = res.detail
},
async seeBuyProcess() {
if (!this.detail?.purchase_last_flow_id) {
Message({
type: "warning",
message: "还未进行采购申请",
duration: 2000
})
return
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.purchase_last_flow_id}?oatoken=${res.oatoken}`
let seeBuy = window.open(url, 'seeBuy',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
async seeBidding() {
if (!this.detail?.invite_last_flow_id) {
Message({
type: "warning",
message: "还未进行招标申请",
duration: 2000
})
return
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?oatoken=${res.oatoken}`
let seeBidding = window.open(url, 'seeBidding',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
async seeSignProcess() {
if (!this.detail?.join_last_flow_id) {
Message({
type: "warning",
message: "还未进行会签申请",
duration: 2000
})
return
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.join_last_flow_id}?oatoken=${res.oatoken}`
let seeSign = window.open(url, 'seeSign',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
async seeAskProcess() {
if (!this.detail?.req_last_flow_id) {
Message({
type: "warning",
message: "还未进行请示申请",
duration: 2000
})
return
}
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.req_last_flow_id}?oatoken=${res.oatoken}`
let seeAsk = window.open(url, 'seeAsk',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
async getDetail(id) {
this.id = id
let res = await detailContract({
id: id
})
this.detail = res
let plans = res.plans
let linkPlan = res.plan_link
let linkPlanTable = plans?.map(item => {
let res = linkPlan.filter(item1 => {
return item1.plan_id === item.id
})[0]
return {
id: item.id,
type: item.type,
name: item.name,
money: item.money,
useMoney: res.use_money
}
})
this.detail.plans = linkPlanTable
console.log(this.detail)
},
},
computed: {
typeFormatter() {
return function(type) {
switch (type) {
case 1:
return "服务"
break;
case 2:
return "货物"
break;
case 3:
return "工程"
break;
case 4:
return '其他'
break;
default:
return "未知"
}
}
},
moneyWayFormatter() {
return function(arr) {
let res = arr?.map(item => {
return item.value
})
return res?.toString()
}
},
moneyFormat() {
return function(money) {
return moneyFormatter(money)
}
}
},
mounted() {
this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height) / 2
this.window.left = (window.screen.width - 10 - this.window.width) / 2
}
}
</script>
<style scoped lang="scss">
.contract-detail {
.base-info {
&-title {
font-weight: 600;
padding: 0 10px;
}
&-item {
display: flex;
margin-top: 8px;
&-title {
padding: 0 20px;
}
&-content {}
&-unit {
margin-left: 20px;
}
}
}
.link-budget-plan {
margin-top: 20px;
&-title {
@extend .base-info-title;
padding-bottom: 10px;
}
}
.sign-info {
&-title {
@extend .link-budget-plan-title;
margin-top:20px;
}
&-item {
@extend .base-info-item;
&-title {
@extend .base-info-item-title;
}
&-content {
@extend .base-info-item-content;
}
&-unit {
@extend .base-info-item-unit;
}
}
}
.pay-plan {
margin-top: 20px;
&-title {
@extend .link-budget-plan-title;
}
}
.related-processes {
margin-top: 20px;
&-title {
@extend .link-budget-plan-title;
}
&-item {
//color: red;
display: flex;
&>div {
cursor: pointer;
margin: 0 20px;
}
}
}
.journal {
margin-top: 20px;
&-title {
@extend .link-budget-plan-title;
}
}
}
</style>

@ -17,7 +17,7 @@
</lx-header>
</div>
<xy-table :list="list" :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
<xy-table :list="list" :total="total" v-loading="loading" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange"
:table-item="table">
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center">
@ -64,12 +64,20 @@
},
data() {
return {
loading:false,
select: {
pageSize: 10,
pageIndex: 1,
keyword: ""
},
rukuType:'',
rukuTypeList:{
purchase:'采购',
return:'回库',
check:'盘点',
data:"数据校对",
testcheck:'模拟盘点'
},
customForm: {
customFormId: "",
tableName: "stocks"
@ -127,6 +135,7 @@
},
methods: {
async getindex() {
this.loading = true
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
@ -145,6 +154,7 @@
})
this.list = res.data
this.total = res.total
this.loading = false
},
pageChange(e) {
@ -229,7 +239,12 @@
if(this.$route.path){
let path = this.$route.path.split("_")[1]
console.log(path)
this.rukuType = path=='check'?'盘点':(path=='purchase'?'采购':'回库')
for(var k in this.rukuTypeList){
if(path==k){
this.rukuType = this.rukuTypeList[k]
}
}
// this.rukuType = path=='check'?'':(path=='purchase'?'':'')
}
this.getField()

Loading…
Cancel
Save