|
|
|
|
@ -100,9 +100,10 @@
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>入库明细 :
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<Button type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
<Button v-if="form.rukuleixing!='回库'" type="primary" icon="md-add" style="margin-bottom: 10px"
|
|
|
|
|
@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: 620px" :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">
|
|
|
|
|
@ -128,9 +129,13 @@
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>物资编码:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input type="text" @focus="showWuzi" v-model="mingxiObj.wuzibianma" placeholder="请选择物资编码"
|
|
|
|
|
<div class="xy-table-item-content" style="display: flex;align-items: center;">
|
|
|
|
|
<el-input v-if="form.rukuleixing!='回库'" type="text" @focus="showWuzi" v-model="mingxiObj.wuzibianma" placeholder="请选择物资编码"
|
|
|
|
|
style="width: 300px;"></el-input>
|
|
|
|
|
<el-input v-if="form.rukuleixing=='回库'" @change='getKucunShow' ref='huikubianma' type="text" v-model="mingxiObj.wuzibianma" placeholder="请扫码获取回库物资编码"
|
|
|
|
|
style="width: 300px;"></el-input>
|
|
|
|
|
<Button @click='showWuzi("回库")' v-if="form.rukuleixing=='回库'" type="primary" icon="md-add" style="margin-left: 10px"
|
|
|
|
|
>选择</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -195,14 +200,15 @@
|
|
|
|
|
<!-- 选择物资编号 -->
|
|
|
|
|
<Modal v-model="isShowWuzi" title="物资选择">
|
|
|
|
|
<div class="searchCompanys">
|
|
|
|
|
<el-input type="text" @keyup.enter.native="getWuzi" v-model="keyword" placeholder="请输入关键词查找"></el-input>
|
|
|
|
|
<el-button type="primary" @click="getWuzi">查询</el-button>
|
|
|
|
|
<el-input type="text" @keyup.enter.native="getList" v-model="keyword" placeholder="请输入关键词查找"></el-input>
|
|
|
|
|
<el-button type="primary" @click="getList">查询</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<Table highlight-row ref="currentRowTable" :columns="wuziColumns" :data="wuziList"
|
|
|
|
|
<Table highlight-row ref="currentRowTable" :columns="wuziColumns" :data="showList"
|
|
|
|
|
@on-current-change="wuziSelect" />
|
|
|
|
|
<Page :current="wuziPageIndex" :total="wuziTotal" simple
|
|
|
|
|
<Page :current="wuziPageIndex" :total="showTotal" simple
|
|
|
|
|
style="padding-top: 14px;display: flex;justify-content: center;" @on-change="wuziPageChange" />
|
|
|
|
|
</Modal>
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -281,10 +287,14 @@
|
|
|
|
|
],
|
|
|
|
|
// 物资
|
|
|
|
|
isShowWuzi: false,
|
|
|
|
|
wuziList: [],
|
|
|
|
|
wuziList: [],
|
|
|
|
|
kucunList:[],
|
|
|
|
|
showList:[],
|
|
|
|
|
wuziPageIndex: 1,
|
|
|
|
|
keyword:'',
|
|
|
|
|
wuziTotal: 0,
|
|
|
|
|
keyword:'',
|
|
|
|
|
showTotal:0,
|
|
|
|
|
wuziTotal: 0,
|
|
|
|
|
kucunTotal:0,
|
|
|
|
|
wuziColumns: [{
|
|
|
|
|
title: '名称',
|
|
|
|
|
key: 'names',
|
|
|
|
|
@ -293,7 +303,8 @@
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getCangku()
|
|
|
|
|
this.getWuzi()
|
|
|
|
|
// this.getWuzi()
|
|
|
|
|
// this.getKucun()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
mingxiConfirm(){
|
|
|
|
|
@ -313,12 +324,18 @@
|
|
|
|
|
this.mingxiObjBefore = {}
|
|
|
|
|
this.mingxiIndex = ''
|
|
|
|
|
this.isShowMingxi = false
|
|
|
|
|
this.showList = []
|
|
|
|
|
this.showTotal = 0
|
|
|
|
|
this.wuziPageIndex = 1
|
|
|
|
|
},
|
|
|
|
|
mingxiCancel(){
|
|
|
|
|
this.mingxiObj = {}
|
|
|
|
|
this.mingxiObjBefore = {}
|
|
|
|
|
this.mingxiIndex = ''
|
|
|
|
|
this.isShowMingxi = false
|
|
|
|
|
this.showList = []
|
|
|
|
|
this.showTotal = 0
|
|
|
|
|
this.wuziPageIndex = 1
|
|
|
|
|
},
|
|
|
|
|
editMingxi(index){
|
|
|
|
|
const before = this.mingxiList[index]
|
|
|
|
|
@ -329,10 +346,40 @@
|
|
|
|
|
this.mingxiIndex = index+1 // 为0时!=‘’为false
|
|
|
|
|
this.isShowMingxi = true
|
|
|
|
|
},
|
|
|
|
|
showWuzi() {
|
|
|
|
|
console.log("123")
|
|
|
|
|
this.isShowWuzi = true
|
|
|
|
|
showWuzi(type) {
|
|
|
|
|
if(this.form.rukuleixing==''){
|
|
|
|
|
Message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '请先选择入库类型'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.isShowWuzi = true
|
|
|
|
|
if(type=='回库'){
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.huikubianma.focus()
|
|
|
|
|
})
|
|
|
|
|
this.getKucun()
|
|
|
|
|
// this.showList = this.kucunList
|
|
|
|
|
// this.showTotal = this.kucunTotal
|
|
|
|
|
}else{
|
|
|
|
|
this.getWuzi()
|
|
|
|
|
// this.showList = this.wuziList
|
|
|
|
|
// this.showTotal = this.wuziTotal
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getList(){
|
|
|
|
|
if(this.form.rukuleixing=='回库'){
|
|
|
|
|
this.getKucun()
|
|
|
|
|
// this.showList = this.kucunList
|
|
|
|
|
// this.showTotal = this.kucunTotal
|
|
|
|
|
}else{
|
|
|
|
|
this.getWuzi()
|
|
|
|
|
// this.showList = this.wuziList
|
|
|
|
|
// this.showTotal = this.wuziTotal
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getWuzi() {
|
|
|
|
|
let res = await index({
|
|
|
|
|
@ -344,8 +391,43 @@
|
|
|
|
|
for (var m of res.data) {
|
|
|
|
|
m.names = m.wuzibianma + "--" + m.zichanmingcheng
|
|
|
|
|
}
|
|
|
|
|
this.wuziList = res.data
|
|
|
|
|
this.wuziTotal = res.total
|
|
|
|
|
this.showList = res.data
|
|
|
|
|
this.showTotal = res.total
|
|
|
|
|
},
|
|
|
|
|
async getKucun() {
|
|
|
|
|
let res = await index({
|
|
|
|
|
page_size: 10,
|
|
|
|
|
page: this.wuziPageIndex,
|
|
|
|
|
table_name: 'inventorys',
|
|
|
|
|
filter:[{"key":"zichanmingcheng","op":"like","value":this.keyword}]
|
|
|
|
|
})
|
|
|
|
|
for (var m of res.data) {
|
|
|
|
|
m.names = m.wuzibianma + "--" + m.zichanmingcheng
|
|
|
|
|
}
|
|
|
|
|
this.showList = res.data
|
|
|
|
|
this.showTotal = res.total
|
|
|
|
|
},
|
|
|
|
|
async getKucunShow(e){
|
|
|
|
|
console.log(e)
|
|
|
|
|
let id = ''
|
|
|
|
|
if(e){
|
|
|
|
|
id = e.split('-')[1]
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.huikubianma.blur()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const res = await show({
|
|
|
|
|
id: id,
|
|
|
|
|
table_name: "inventorys"
|
|
|
|
|
})
|
|
|
|
|
this.mingxiObj.wuzibianma = res.wuzibianma
|
|
|
|
|
this.mingxiObj.zichanmingcheng = res.zichanmingcheng
|
|
|
|
|
this.mingxiObj.wuzileixing = res.wuzileixing
|
|
|
|
|
this.mingxiObj.jiliangdanwei = res.jiliangdanwei
|
|
|
|
|
this.mingxiObj.id = res.id
|
|
|
|
|
},
|
|
|
|
|
async getCangku() {
|
|
|
|
|
let res = await index({
|
|
|
|
|
@ -361,9 +443,10 @@
|
|
|
|
|
this.mingxiObj.wuzileixing = e.wuzileixing
|
|
|
|
|
this.mingxiObj.jiliangdanwei = e.jiliangdanwei
|
|
|
|
|
},
|
|
|
|
|
wuziPageChange(e) {
|
|
|
|
|
wuziPageChange(e) {
|
|
|
|
|
console.log("e",e)
|
|
|
|
|
this.wuziPageIndex = e
|
|
|
|
|
this.getWuzi()
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
showWuzimingxi() {
|
|
|
|
|
|
|
|
|
|
@ -404,7 +487,6 @@
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '编辑成功'
|
|
|
|
|
})
|
|
|
|
|
callback
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
|