|
|
|
|
@ -3,19 +3,17 @@
|
|
|
|
|
<xy-dialog ref="dialog" :width='80' :is-show.sync="isShow" type="form" :title="type === 'add' ? `新增${rukuTypeName}入库` : `编辑${rukuTypeName}入库`" :form="form"
|
|
|
|
|
:rules="rules" @submit="submit">
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:guanlianhetong v-if="form.rukuleixing=='采购'">
|
|
|
|
|
<template v-slot:caigouhetong v-if="form.rukuleixing=='采购'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联合同:
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>采购合同:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.guanlianhetong" style="width: 300px;" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in lexingoptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-input type="text" @focus="isShowHt=true" v-model="form.caigouhetong"
|
|
|
|
|
placeholder="请选择采购合同" style="width: 300px;"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template> -->
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:rukushijian>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -244,9 +242,20 @@
|
|
|
|
|
@on-current-change="wuziSelect" />
|
|
|
|
|
<Page :current="wuziPageIndex" :total="showTotal" simple
|
|
|
|
|
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="wuziPageChange" />
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<!-- 选择采购合同 -->
|
|
|
|
|
<Modal v-model="isShowHt" title="合同选择">
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
<Table highlight-row ref="currentRowTable" :columns="htColumns" :data="htList"
|
|
|
|
|
@on-current-change="htSelect" />
|
|
|
|
|
<Page :current="htPageIndex" :total="htTotal" simple
|
|
|
|
|
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="htPageChange" />
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -255,7 +264,10 @@
|
|
|
|
|
save,
|
|
|
|
|
index,
|
|
|
|
|
show
|
|
|
|
|
} from "@/api/system/baseForm.js"
|
|
|
|
|
} from "@/api/system/baseForm.js"
|
|
|
|
|
import {
|
|
|
|
|
index as getContract
|
|
|
|
|
} from "@/api/contract.js"
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
@ -282,9 +294,10 @@
|
|
|
|
|
value: '回库'
|
|
|
|
|
}],
|
|
|
|
|
rukupiciList:[],
|
|
|
|
|
form: {
|
|
|
|
|
form: {
|
|
|
|
|
caigouhetong:'',
|
|
|
|
|
rukushijian: '',
|
|
|
|
|
// guanlianhetong:'',
|
|
|
|
|
// caigouhetong:'',
|
|
|
|
|
rukuleixing: '',
|
|
|
|
|
rukucangku: '',
|
|
|
|
|
jingbanren: "",
|
|
|
|
|
@ -298,9 +311,9 @@
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择入库时间'
|
|
|
|
|
}],
|
|
|
|
|
// rukushijian: [{
|
|
|
|
|
// caigouhetong: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请选择入库类型'
|
|
|
|
|
// message: '请选择采购合同'
|
|
|
|
|
// }],
|
|
|
|
|
jingbanren: [{
|
|
|
|
|
required: true,
|
|
|
|
|
@ -310,7 +323,8 @@
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写记录人员'
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
hetongoptions:[],
|
|
|
|
|
isShowMingxi: false,
|
|
|
|
|
showLoading: true,
|
|
|
|
|
mingxiObj: {
|
|
|
|
|
@ -388,15 +402,84 @@
|
|
|
|
|
},{
|
|
|
|
|
title:'物资类型',
|
|
|
|
|
key:'wuzileixing',
|
|
|
|
|
}]
|
|
|
|
|
}],
|
|
|
|
|
// 合同
|
|
|
|
|
isShowHt: false,
|
|
|
|
|
htList: [],
|
|
|
|
|
htPageIndex: 1,
|
|
|
|
|
htkeyword: '',
|
|
|
|
|
htTotal: 0,
|
|
|
|
|
htColumns: [{
|
|
|
|
|
width: 60,
|
|
|
|
|
_isChecked: false,
|
|
|
|
|
key: "isSelect",
|
|
|
|
|
resizable: true,
|
|
|
|
|
render: (h, params) => {
|
|
|
|
|
return h('div', [
|
|
|
|
|
h('Radio', {
|
|
|
|
|
props: {
|
|
|
|
|
value: params.row.isSelect
|
|
|
|
|
},
|
|
|
|
|
on: {
|
|
|
|
|
'on-change': (e) => {
|
|
|
|
|
this.htList.forEach((items) => {
|
|
|
|
|
this.$set(items, 'isSelect', false)
|
|
|
|
|
});
|
|
|
|
|
this.htList[params.index].isSelect = e;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '名称',
|
|
|
|
|
key: 'name',
|
|
|
|
|
},{
|
|
|
|
|
title:'类型',
|
|
|
|
|
key:'type_name',
|
|
|
|
|
},{
|
|
|
|
|
title:'状态',
|
|
|
|
|
key:'status_name'
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getCangku()
|
|
|
|
|
// this.getWuzi()
|
|
|
|
|
// this.getKucun()
|
|
|
|
|
// this.getKucun()
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
async getHt(){
|
|
|
|
|
let res = await getContract({
|
|
|
|
|
page_size: 10,
|
|
|
|
|
page: this.htPageIndex,
|
|
|
|
|
keyword:this.htkeyword
|
|
|
|
|
// type:2,
|
|
|
|
|
})
|
|
|
|
|
for (var m of res.data) {
|
|
|
|
|
m.isSelect = false
|
|
|
|
|
m.type_name = '货物'
|
|
|
|
|
m.status_name = m.status==1?'待签订':(m.status==2?'已签订':'')
|
|
|
|
|
}
|
|
|
|
|
this.htList = res.data
|
|
|
|
|
this.htTotal = res.total
|
|
|
|
|
// this.hetongoptions = res.data
|
|
|
|
|
},
|
|
|
|
|
htSelect(e) {
|
|
|
|
|
this.htList.forEach((items) => {
|
|
|
|
|
this.$set(items, 'isSelect', false)
|
|
|
|
|
if(items.id==e.id){
|
|
|
|
|
this.$set(items, 'isSelect', true)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.form.caigouhetong = e.name
|
|
|
|
|
},
|
|
|
|
|
htPageChange(e) {
|
|
|
|
|
console.log("e", e)
|
|
|
|
|
this.htPageIndex = e
|
|
|
|
|
this.getHt()
|
|
|
|
|
},
|
|
|
|
|
mingxiConfirm() {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.showLoading = false
|
|
|
|
|
@ -624,7 +707,8 @@
|
|
|
|
|
id: this.id,
|
|
|
|
|
table_name: this.tableName
|
|
|
|
|
})
|
|
|
|
|
this.form = {
|
|
|
|
|
this.form = {
|
|
|
|
|
caigouhetong:res?.caigouhetong,
|
|
|
|
|
rukushijian: res?.rukushijian,
|
|
|
|
|
rukuleixing: res?.rukuleixing,
|
|
|
|
|
rukucangku:res.rukucangku,
|
|
|
|
|
@ -741,7 +825,10 @@
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.form.rukuleixing = this.rukuType
|
|
|
|
|
this.rukuTypeName = this.rukuType=='回库'?'归还':this.rukuType
|
|
|
|
|
this.rukuTypeName = this.rukuType=='回库'?'归还':this.rukuType
|
|
|
|
|
if(this.rukuType=='采购'){
|
|
|
|
|
this.getHt()
|
|
|
|
|
}
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}
|
|
|
|
|
|