更新代码

This commit is contained in:
xiao-fajia 2024-09-19 15:25:40 +08:00
parent 8324cf9233
commit 6ab9561cef
11 changed files with 298 additions and 106 deletions

View File

@ -10,3 +10,12 @@ export function createSt(data){
data data
}) })
} }
// 分页查
export function getStPage(params){
return request({
url: preUrl + "/page",
method: "get",
params
})
}

View File

@ -1 +1,12 @@
import request from '@/utils/request' import request from '@/utils/request'
const preUrl = "/repair/sti"
// 调拨单子表 分页
export function getStiPage(params){
return request({
url: preUrl + "/page",
method: "get",
params
})
}

View File

@ -133,7 +133,8 @@ export default {
}, },
data() { data() {
return { return {
tenantCode:"lighting", tenantCode:"lighting", // TODO
// tenantCode:"lanan",
codeUrl: "", codeUrl: "",
// //
captchaEnable: false, captchaEnable: false,

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-select class="main-select-tree" clearable ref="selectTree" v-model="warehouseSelected"> <el-select class="main-select-tree" clearable ref="selectTree" v-model="warehouseSelected" @blur="$emit('input-blur', $event)">
<el-option v-for="warehouse in optionData(warehouseList)" <el-option v-for="warehouse in optionData(warehouseList)"
:key="warehouse.value" :key="warehouse.value"
:label="warehouse.label" :label="warehouse.label"

View File

@ -13,7 +13,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-if="soByType && !goodsYes" label="供应商" prop="supplierId"> <el-form-item v-if="soByType && !goodsYes" label="供应商" prop="supplierId">
<SupplierChoose v-model="queryParams.supplierId"/> <SupplierChoose v-model="queryParams.supplier"/>
</el-form-item> </el-form-item>
<el-form-item v-if="goodsYes" label="关键字" prop="soNo"> <el-form-item v-if="goodsYes" label="关键字" prop="soNo">
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/> <el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
@ -30,10 +30,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="!soByType" label="领料人" prop="userId"> <el-form-item v-if="!soByType" label="领料人" prop="userId">
<StaffChoose v-model="queryParams.userId" @selected="getStaff"/> <StaffChoose v-model="queryParams.user" @selected="getStaff"/>
</el-form-item> </el-form-item>
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId"> <el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
<CorpChoose v-model="queryParams.corpId" @selected="getCompany"/> <CorpChoose v-model="queryParams.corp" @selected="getCompany"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -105,9 +105,9 @@
<el-table-column label="备注" align="center" prop="remark" width="180"/> <el-table-column label="备注" align="center" prop="remark" width="180"/>
<el-table-column label="操作" fixed="right" width="180" align="center"> <el-table-column label="操作" fixed="right" width="180" align="center">
<template v-slot="scope"> <template v-slot="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-edit"--> <!-- <el-button size="mini" type="text" icon="el-icon-edit"-->
<!-- >修改--> <!-- >修改-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)" <el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)"
>作废 >作废
</el-button> </el-button>
@ -155,6 +155,17 @@ export default {
required: false required: false
} }
}, },
watch: {
'queryParams.supplier'(val) {
this.queryParams.supplierId = val ? val.id : null
},
'queryParams.corp'(val) {
this.queryParams.corpId = val ? val.id : null
},
'queryParams.user'(val) {
this.queryParams.userId = val ? val.id : null
}
},
data() { data() {
return { return {
queryParams: { queryParams: {
@ -162,10 +173,13 @@ export default {
pageSize: 10, pageSize: 10,
searchTimeArray: [], searchTimeArray: [],
soNo: null, soNo: null,
supplier: null,
supplierId: null, supplierId: null,
supplierName: null, supplierName: null,
soStatus: null, soStatus: null,
corp: null,
corpId: null, corpId: null,
user: null,
userId: null, userId: null,
userName: null, userName: null,
soType: this.soByType ? "01" : "02", soType: this.soByType ? "01" : "02",
@ -217,6 +231,9 @@ export default {
// //
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm('queryForm')
this.queryParams.supplier = null
this.queryParams.corp = null
this.queryParams.user = null
this.handleQuery() this.handleQuery()
}, },
// //
@ -245,7 +262,8 @@ export default {
await voidSo(this.formData) await voidSo(this.formData)
this.$modal.msgSuccess("作废成功") this.$modal.msgSuccess("作废成功")
await this.pageSo() await this.pageSo()
}catch{} } catch {
}
} }
} }
} }

View File

@ -5,8 +5,9 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
show-summary show-summary
:summary-method="getSummaries" :summary-method="getSummaries"
:key="randomKey" @cell-mouse-enter="handleCellEnter"
@cell-dblclick="editData" @cell-mouse-leave="handleCellLeave"
@cell-click="handleCellClick"
> >
<el-table-column label="序号" align="center"> <el-table-column label="序号" align="center">
<template scope="scope"> <template scope="scope">
@ -17,45 +18,32 @@
<el-table-column label="规格" align="center" width="180" prop="model"/> <el-table-column label="规格" align="center" width="180" prop="model"/>
<el-table-column label="商品编码" align="center" width="180" prop="code"/> <el-table-column label="商品编码" align="center" width="180" prop="code"/>
<el-table-column label="仓库" align="center" width="150" prop="warehouse"> <el-table-column label="仓库" align="center" width="150" prop="warehouse">
<template slot-scope="scope"> <div class="item" slot-scope="scope">
<WarehouseChoose v-if="scope.row[scope.column.property + 'isShow'] && soByType" <WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.warehouse" />
:ref="scope.column.property" <span class="item__txt">{{ scope.row.warehouse }}</span>
v-model="scope.row.warehouse" </div>
@change="alterData(scope.row,scope.column)"
/>
<span v-else>{{ scope.row.warehouse }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="库存" align="center" width="150" prop="stock"/> <el-table-column label="库存" align="center" width="150" prop="stock"/>
<el-table-column label="单位" align="center" width="150" prop="unit"/> <el-table-column label="单位" align="center" width="150" prop="unit"/>
<el-table-column label="数量" align="center" width="150" prop="count"> <el-table-column label="数量" align="center" width="150" prop="count">
<template slot-scope="scope"> <div class="item" slot-scope="scope">
<el-input v-if="scope.row[scope.column.property + 'isShow']" <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count" placeholder="请输入内容"></el-input>
:ref="scope.column.property" <span class="item__txt">{{ scope.row.count }}</span>
v-model="scope.row.count" </div>
@blur="alterData(scope.row,scope.column)"></el-input>
<span v-else>{{ scope.row.count }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150" prop="price"/> <el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150" prop="price"/>
<el-table-column v-if="soByType" label="采购单价" align="center" width="150" prop="newPrice"> <el-table-column v-if="soByType" label="采购单价" align="center" width="150" prop="newPrice">
<template slot-scope="scope"> <div class="item" slot-scope="scope">
<el-input v-if="scope.row[scope.column.property + 'isShow'] && soByType" <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.newPrice" placeholder="请输入内容"></el-input>
:ref="scope.column.property" <span class="item__txt">{{ scope.row.newPrice }}</span>
v-model="scope.row.newPrice" </div>
@blur="alterData(scope.row,scope.column)"></el-input>
<span v-else>{{ scope.row.newPrice }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150" prop="totalPrice"/> <el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150" prop="totalPrice"/>
<el-table-column label="备注" align="center" width="180" prop="remark"> <el-table-column label="备注" align="center" width="180" prop="remark">
<template slot-scope="scope"> <div class="item" slot-scope="scope">
<el-input v-if="scope.row[scope.column.property + 'isShow']" <el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark" placeholder="请输入内容"></el-input>
:ref="scope.column.property" <span class="item__txt">{{ scope.row.remark }}</span>
v-model="scope.row.remark" </div>
@blur="alterData(scope.row,scope.column)"></el-input>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150"> <el-table-column label="操作" fixed="right" align="center" width="150">
<template v-slot="scope"> <template v-slot="scope">
@ -90,7 +78,10 @@ export default {
loading: false, loading: false,
list: [], list: [],
includeColumn: ['count', 'totalPrice'], includeColumn: ['count', 'totalPrice'],
randomKey: Math.random(), //
editProp: this.soByType ? ['warehouse', 'count', 'newPrice', 'remark'] : ['count', 'remark'],
// cell
clickCellMap: {}
} }
}, },
watch: { watch: {
@ -107,7 +98,6 @@ export default {
this.list.push(newData) this.list.push(newData)
}else { }else {
this.list = [] this.list = []
this.refreshTable()
} }
}, },
list: { list: {
@ -146,27 +136,93 @@ export default {
}); });
return sums return sums
}, },
editData(row, column) { /** 鼠标移入cell */
row[column.property + "isShow"] = true handleCellEnter(row, column, cell, event) {
//refreshTabletabletable const property = column.property
this.refreshTable() if (this.editProp.includes(property)) {
// this.$nextTick(() => { cell.querySelector('.item__txt').classList.add('item__txt--hover')
// this.$refs[column.property] && this.$refs[column.property].focus() }
// })
}, },
alterData(row, column) { /** 鼠标移出cell */
row[column.property + "isShow"] = false handleCellLeave(row, column, cell, event) {
const data = this.list.find(item => item.id === row.id) const property = column.property
data.totalPrice = data.newPrice * data.count if (this.editProp.includes(property)) {
this.refreshTable() cell.querySelector('.item__txt').classList.remove('item__txt--hover')
}
}, },
refreshTable() { /** 点击cell */
this.randomKey = Math.random() handleCellClick(row, column, cell, event) {
const property = column.property
if (this.editProp.includes(property)) {
// cell
this.saveCellClick(row, cell)
cell.querySelector('.item__txt').style.display = 'none'
cell.querySelector('.item__input').style.display = 'inline'
cell.querySelector('input').focus()
}
}, },
/** 取消编辑状态 */
cancelEditable(cell) {
cell.querySelector('.item__txt').style.display = 'inline'
cell.querySelector('.item__input').style.display = 'none'
},
/** 保存进入编辑的cell */
saveCellClick(row, cell) {
const id = row.id
if (this.clickCellMap[id] !== undefined) {
if (!this.clickCellMap[id].includes(cell)) {
this.clickCellMap[id].push(cell)
}
} else {
this.clickCellMap[id] = [cell]
}
},
/** 保存数据 */
save (row) {
//
row.totalPrice = row.count * row.newPrice
const id = row.id
// cell
this.clickCellMap[id].forEach(cell => {
this.cancelEditable(cell)
})
this.clickCellMap[id] = []
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item {
.item__input {
display: none;
width: 100px;
/* 调整elementUI中样式 如果不需要调整请忽略 */
.el-input__inner {
height: 24px !important;
}
/* 调整elementUI中样式 如果不需要调整请忽略 */
.el-input__suffix {
i {
font-size: 12px !important;
line-height: 26px !important;
}
}
}
.item__txt {
box-sizing: border-box;
border: 1px solid transparent;
width: 100px;
line-height: 24px;
padding: 0 8px;
}
.item__txt--hover {
border: 1px solid #dddddd;
border-radius: 4px;
cursor: text;
}
}
</style> </style>

View File

@ -13,16 +13,16 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-if="soByType" label="供应商" prop="supplierId"> <el-form-item v-if="soByType" label="供应商" prop="supplierId">
<SupplierChoose v-model="queryParams.supplierId" /> <SupplierChoose v-model="queryParams.supplier" />
</el-form-item> </el-form-item>
<el-form-item label="单据号" prop="soNo"> <el-form-item label="单据号" prop="soNo">
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/> <el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
</el-form-item> </el-form-item>
<el-form-item v-if="!soByType" label="领料人" prop="userId"> <el-form-item v-if="!soByType" label="领料人" prop="userId">
<StaffChoose v-model="queryParams.userId" @selected="getStaff"/> <StaffChoose v-model="queryParams.user" @selected="getStaff"/>
</el-form-item> </el-form-item>
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId"> <el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
<CorpChoose v-model="queryParams.corpId" /> <CorpChoose v-model="queryParams.corp" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@ -81,6 +81,17 @@ export default {
required: true required: true
}, },
}, },
watch:{
'queryParams.supplier'(val){
this.queryParams.supplierId = val ? val.id : null
},
'queryParams.corp'(val){
this.queryParams.corpId = val ? val.id : null
},
'queryParams.user'(val){
this.queryParams.userId = val ? val.id : null
}
},
data() { data() {
return { return {
queryParams:{ queryParams:{
@ -88,9 +99,12 @@ export default {
pageSize: 10, pageSize: 10,
searchTimeArray:[], searchTimeArray:[],
soNo: null, soNo: null,
supplier: null,
supplierId: null, supplierId: null,
supplierName: null, supplierName: null,
corp: null,
corpId: null, corpId: null,
user: null,
userId: null, userId: null,
userName: null, userName: null,
soType: this.soByType ? "01" : "02", soType: this.soByType ? "01" : "02",
@ -130,6 +144,9 @@ export default {
// //
handleResetQuery(){ handleResetQuery(){
this.resetForm('queryForm') this.resetForm('queryForm')
this.queryParams.supplier = null
this.queryParams.corp = null
this.queryParams.user = null
this.handleQuery() this.handleQuery()
} }
} }

View File

@ -19,7 +19,7 @@
<el-input v-model="queryParams.standard" style="width: 18rem" placeholder="请输入规格"/> <el-input v-model="queryParams.standard" style="width: 18rem" placeholder="请输入规格"/>
</el-form-item> </el-form-item>
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId"> <el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
<CorpChoose v-model="queryParams.corpId" /> <CorpChoose v-model="queryParams.corp" />
</el-form-item> </el-form-item>
<el-form-item v-if="soByType" label="所属库位" prop="warehouseId"> <el-form-item v-if="soByType" label="所属库位" prop="warehouseId">
<WarehouseChoose v-model="queryParams.warehouseId" @selected="getWarehouse"/> <WarehouseChoose v-model="queryParams.warehouseId" @selected="getWarehouse"/>
@ -81,6 +81,11 @@ export default {
required: true required: true
}, },
}, },
watch:{
'queryParams.corp'(val){
this.queryParams.corpId = val ? val.id : null
}
},
data() { data() {
return { return {
queryParams:{ queryParams:{
@ -90,7 +95,8 @@ export default {
soNo: null, soNo: null,
corpId: null, corpId: null,
soiType: this.soByType ? "01" : "02", soiType: this.soByType ? "01" : "02",
warehouseId: null warehouseId: null,
corp: null,
}, },
showSearch: true, showSearch: true,
loading: false, loading: false,
@ -124,6 +130,7 @@ export default {
// //
handleResetQuery(){ handleResetQuery(){
this.resetForm('queryForm') this.resetForm('queryForm')
this.queryParams.corp = null
this.handleQuery() this.handleQuery()
} }
} }

View File

@ -13,20 +13,21 @@
<el-form-item :label="stByType ? '单据号' : '关键字'" prop="soNo"> <el-form-item :label="stByType ? '单据号' : '关键字'" prop="soNo">
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/> <el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
</el-form-item> </el-form-item>
<el-form-item label="调出门店" prop="corpId"> <el-form-item label="调出门店" prop="outCorpId">
<CorpChoose /> <CorpChoose v-model="queryParams.outCorp"/>
</el-form-item> </el-form-item>
<el-form-item label="调入门店" prop="corpId"> <el-form-item label="调入门店" prop="inCorpId">
<CorpChoose /> <CorpChoose v-model="queryParams.inCorp"/>
</el-form-item> </el-form-item>
<el-form-item label="审核状态" prop=""> <el-form-item label="审核状态" prop="stStatus">
<el-select v-model="queryParams.stStatus"> <el-select v-model="queryParams.stStatus">
<el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_ST_STATUS)" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in this.getDictDatas(DICT_TYPE.REPAIR_ST_STATUS)" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh">重置</el-button> <el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -38,27 +39,27 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单号" align="center" prop="soNo" width="180" /> <el-table-column label="单号" align="center" prop="stNo" width="200"/>
<el-table-column label="调出门店" align="center" prop="corpName" width="180" /> <el-table-column label="调出门店" align="center" prop="outCorpId" width="180"/>
<el-table-column label="调入门店" align="center" prop="corpName" width="180" /> <el-table-column label="调入门店" align="center" prop="inCorpId" width="180"/>
<el-table-column label="调拨数量" align="center" prop="itemCount" width="150" /> <el-table-column label="调拨数量" align="center" prop="itemCount" width="150"/>
<el-table-column v-if="stByType" label="调拨成本" align="center" prop="itemCount" width="150" /> <el-table-column v-if="stByType" label="调拨成本" align="center" prop="totalPrice" width="150"/>
<el-table-column label="调拨总额" align="center" prop="itemCount" width="150" /> <el-table-column label="调拨总额" align="center" prop="totalPrice" width="150"/>
<el-table-column v-if="stByType" label="差额" align="center" prop="itemCount" width="150" /> <el-table-column v-if="stByType" label="差额" align="center" prop="itemCount" width="150"/>
<el-table-column v-if="stByType" label="本次优惠" align="center" prop="itemCount" width="150" /> <el-table-column v-if="stByType" label="本次优惠" align="center" prop="discountPrice" width="150"/>
<el-table-column v-if="stByType" label="本次收款" align="center" prop="itemCount" width="150" /> <el-table-column v-if="stByType" label="本次收款" align="center" prop="thisCollection" width="150"/>
<el-table-column v-if="stByType" label="本次欠款" align="center" prop="itemCount" width="150" /> <el-table-column v-if="stByType" label="本次欠款" align="center" prop="thisDebt" width="150"/>
<el-table-column label="调拨日期" align="center" prop="itemCount" width="150" /> <el-table-column label="调拨日期" align="center" prop="stTime" width="150"/>
<el-table-column label="调拨人" align="center" prop="itemCount" width="150" /> <el-table-column label="调拨人" align="center" prop="userName" width="150"/>
<el-table-column v-if="!stByType" label="审核日期" align="center" prop="itemCount" width="150" /> <el-table-column v-if="!stByType" label="审核日期" align="center" prop="itemCount" width="150"/>
<el-table-column label="状态" align="center" prop="itemCount" width="150" /> <el-table-column label="状态" align="center" prop="stStatus" width="150"/>
<el-table-column label="备注" align="center" prop="itemCount" width="180" /> <el-table-column label="备注" align="center" prop="remark" width="180"/>
<el-table-column v-if="!stByType" label="退回备注" align="center" prop="itemCount" width="180" /> <el-table-column v-if="!stByType" label="退回备注" align="center" prop="remark" width="180"/>
<el-table-column label="操作" fixed="right" width="180" align="center"> <el-table-column label="操作" fixed="right" width="180" align="center">
<template v-if="stByType" v-slot="scope"> <template v-if="stByType" v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" <!-- <el-button size="mini" type="text" icon="el-icon-edit"-->
>修改 <!-- >修改-->
</el-button> <!-- </el-button>-->
<el-button size="mini" type="text" icon="el-icon-close" <el-button size="mini" type="text" icon="el-icon-close"
>作废 >作废
</el-button> </el-button>
@ -73,28 +74,45 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination style="margin-bottom: 2rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
/> />
</div> </div>
</template> </template>
<script> <script>
import CorpChoose from "@/views/repair/Components/CorpChoose.vue"; import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import {getStPage} from "@/api/repair/stockTransfer/stockTransfer";
export default { export default {
name: "StIndex", name: "StIndex",
components: {CorpChoose}, components: {CorpChoose},
props:{ props: {
stByType:{ stByType: {
type: Boolean, type: Boolean,
defaultValue: true, defaultValue: true,
required: true required: true
} }
}, },
watch:{
'queryParams.outCorp'(val){
this.queryParams.outCorpId = val ? val.id : null
},
'queryParams.inCorp'(val){
this.queryParams.inCorpId = val ? val.id : null
}
},
data() { data() {
return { return {
queryParams:{ queryParams: {
stStatus: null pageNo: 1,
pageSize: 10,
stStatus: null,
outCorp: null,
outCorpId: null,
inCorp:null,
inCorpId: null,
searchTimeArray: [],
stNo: null,
}, },
showSearch: true, showSearch: true,
loading: false, loading: false,
@ -102,7 +120,26 @@ export default {
total: 0 total: 0
} }
}, },
methods: {} mounted() {
this.getList()
},
methods: {
async getList() {
const res = await getStPage(this.queryParams)
this.list = res.data.records
this.total = res.data.total
},
handleQuery() {
this.queryParams.pageNo = 1
this.getList()
},
handleReset() {
this.resetForm('queryForm')
this.queryParams.outCorp = null
this.queryParams.inCorp = null
this.handleQuery()
}
}
} }
</script> </script>

View File

@ -180,7 +180,7 @@ export default {
// //
init(){ init(){
// TODO // TODO
// this.companyInit() this.companyInit()
this.formData = { this.formData = {
stNo: null, stNo: null,
newCorp: null, newCorp: null,

View File

@ -13,15 +13,15 @@
<el-form-item label="关键字" prop="soNo"> <el-form-item label="关键字" prop="soNo">
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/> <el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
</el-form-item> </el-form-item>
<el-form-item label="调出门店" prop="corpId"> <el-form-item label="调出门店" prop="outCorpId">
<CorpChoose /> <CorpChoose v-model="queryParams.outCorp" />
</el-form-item> </el-form-item>
<el-form-item label="调入门店" prop="corpId"> <el-form-item label="调入门店" prop="inCorpId">
<CorpChoose /> <CorpChoose v-model="queryParams.inCorp"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh">重置</el-button> <el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -38,8 +38,8 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单号" align="center" prop="soNo" width="180" /> <el-table-column label="单号" align="center" prop="stId" width="180" />
<el-table-column label="商品名称" align="center" prop="soNo" width="180" /> <el-table-column label="商品名称" align="center" prop="goodsId" width="180" />
<el-table-column label="规格" align="center" prop="soNo" width="180" /> <el-table-column label="规格" align="center" prop="soNo" width="180" />
<el-table-column label="商品编码" align="center" prop="soNo" width="180" /> <el-table-column label="商品编码" align="center" prop="soNo" width="180" />
<el-table-column v-if="!stByType" label="条形码" align="center" prop="soNo" width="180" /> <el-table-column v-if="!stByType" label="条形码" align="center" prop="soNo" width="180" />
@ -54,7 +54,7 @@
<el-table-column label="调入门店" align="center" prop="itemCount" width="180" /> <el-table-column label="调入门店" align="center" prop="itemCount" width="180" />
<el-table-column label="调入仓库" align="center" prop="itemCount" width="180" /> <el-table-column label="调入仓库" align="center" prop="itemCount" width="180" />
<el-table-column label="调拨时间" align="center" prop="itemCount" width="180" /> <el-table-column label="调拨时间" align="center" prop="itemCount" width="180" />
<el-table-column label="备注" align="center" prop="itemCount" width="180" /> <el-table-column label="备注" align="center" prop="remark" width="180" />
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
/> />
@ -62,6 +62,7 @@
</template> </template>
<script> <script>
import {getStiPage} from "@/api/repair/stockTransfer/stockTransferItem";
import CorpChoose from "@/views/repair/Components/CorpChoose.vue"; import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
export default { export default {
@ -74,16 +75,51 @@ export default {
required: true required: true
} }
}, },
watch:{
'queryParams.outCorp'(val){
this.queryParams.outCorpId = val ? val.id : null
},
'queryParams.inCorp'(val){
this.queryParams.inCorpId = val ? val.id : null
}
},
data() { data() {
return { return {
queryParams: {}, queryParams: {
pageNo: 1,
pageSize: 10,
searchTimeArray: [],
outCorp: null,
outCorpId: null,
inCorp: null,
inCorpId: null
},
showSearch: true, showSearch: true,
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
} }
}, },
methods: {} mounted() {
this.getList()
},
methods: {
async getList(){
const res = await getStiPage(this.queryParams)
this.list = res.data.records
this.total = res.data.total
},
handleQuery(){
this.queryParams.pageNo = 1
this.getList()
},
handleReset(){
this.resetForm("queryForm")
this.queryParams.outCorp = null
this.queryParams.inCorp = null
this.handleQuery()
}
}
} }
</script> </script>