更新代码
This commit is contained in:
parent
8324cf9233
commit
6ab9561cef
@ -10,3 +10,12 @@ export function createSt(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查
|
||||
export function getStPage(params){
|
||||
return request({
|
||||
url: preUrl + "/page",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
@ -1 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
const preUrl = "/repair/sti"
|
||||
|
||||
// 调拨单子表 分页
|
||||
export function getStiPage(params){
|
||||
return request({
|
||||
url: preUrl + "/page",
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
|
@ -133,7 +133,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tenantCode:"lighting",
|
||||
tenantCode:"lighting", // TODO 这里手动改还是不太合理
|
||||
// tenantCode:"lanan",
|
||||
codeUrl: "",
|
||||
//是否开启图形验证码
|
||||
captchaEnable: false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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)"
|
||||
:key="warehouse.value"
|
||||
:label="warehouse.label"
|
||||
|
@ -13,7 +13,7 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<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 v-if="goodsYes" label="关键字" prop="soNo">
|
||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
|
||||
@ -30,10 +30,10 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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 :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-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="操作" fixed="right" width="180" align="center">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)"
|
||||
>作废
|
||||
</el-button>
|
||||
@ -155,6 +155,17 @@ export default {
|
||||
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() {
|
||||
return {
|
||||
queryParams: {
|
||||
@ -162,10 +173,13 @@ export default {
|
||||
pageSize: 10,
|
||||
searchTimeArray: [],
|
||||
soNo: null,
|
||||
supplier: null,
|
||||
supplierId: null,
|
||||
supplierName: null,
|
||||
soStatus: null,
|
||||
corp: null,
|
||||
corpId: null,
|
||||
user: null,
|
||||
userId: null,
|
||||
userName: null,
|
||||
soType: this.soByType ? "01" : "02",
|
||||
@ -217,6 +231,9 @@ export default {
|
||||
// 搜索重置
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.supplier = null
|
||||
this.queryParams.corp = null
|
||||
this.queryParams.user = null
|
||||
this.handleQuery()
|
||||
},
|
||||
// 员工选择组件的回调
|
||||
@ -245,7 +262,8 @@ export default {
|
||||
await voidSo(this.formData)
|
||||
this.$modal.msgSuccess("作废成功")
|
||||
await this.pageSo()
|
||||
}catch{}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,9 @@
|
||||
:show-overflow-tooltip="true"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
:key="randomKey"
|
||||
@cell-dblclick="editData"
|
||||
@cell-mouse-enter="handleCellEnter"
|
||||
@cell-mouse-leave="handleCellLeave"
|
||||
@cell-click="handleCellClick"
|
||||
>
|
||||
<el-table-column label="序号" align="center">
|
||||
<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="code"/>
|
||||
<el-table-column label="仓库" align="center" width="150" prop="warehouse">
|
||||
<template slot-scope="scope">
|
||||
<WarehouseChoose v-if="scope.row[scope.column.property + 'isShow'] && soByType"
|
||||
:ref="scope.column.property"
|
||||
v-model="scope.row.warehouse"
|
||||
@change="alterData(scope.row,scope.column)"
|
||||
/>
|
||||
<span v-else>{{ scope.row.warehouse }}</span>
|
||||
</template>
|
||||
<div class="item" slot-scope="scope">
|
||||
<WarehouseChoose @input-blur="save(scope.row)" class="item__input" v-model="scope.row.warehouse" />
|
||||
<span class="item__txt">{{ scope.row.warehouse }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<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="count">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row[scope.column.property + 'isShow']"
|
||||
:ref="scope.column.property"
|
||||
v-model="scope.row.count"
|
||||
@blur="alterData(scope.row,scope.column)"></el-input>
|
||||
<span v-else>{{ scope.row.count }}</span>
|
||||
</template>
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.count" placeholder="请输入内容"></el-input>
|
||||
<span class="item__txt">{{ scope.row.count }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150" prop="price"/>
|
||||
<el-table-column v-if="soByType" label="采购单价" align="center" width="150" prop="newPrice">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row[scope.column.property + 'isShow'] && soByType"
|
||||
:ref="scope.column.property"
|
||||
v-model="scope.row.newPrice"
|
||||
@blur="alterData(scope.row,scope.column)"></el-input>
|
||||
<span v-else>{{ scope.row.newPrice }}</span>
|
||||
</template>
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.newPrice" placeholder="请输入内容"></el-input>
|
||||
<span class="item__txt">{{ scope.row.newPrice }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150" prop="totalPrice"/>
|
||||
<el-table-column label="备注" align="center" width="180" prop="remark">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row[scope.column.property + 'isShow']"
|
||||
:ref="scope.column.property"
|
||||
v-model="scope.row.remark"
|
||||
@blur="alterData(scope.row,scope.column)"></el-input>
|
||||
<span v-else>{{ scope.row.remark }}</span>
|
||||
</template>
|
||||
<div class="item" slot-scope="scope">
|
||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.remark" placeholder="请输入内容"></el-input>
|
||||
<span class="item__txt">{{ scope.row.remark }}</span>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||
<template v-slot="scope">
|
||||
@ -90,7 +78,10 @@ export default {
|
||||
loading: false,
|
||||
list: [],
|
||||
includeColumn: ['count', 'totalPrice'],
|
||||
randomKey: Math.random(),
|
||||
// 需要编辑的属性
|
||||
editProp: this.soByType ? ['warehouse', 'count', 'newPrice', 'remark'] : ['count', 'remark'],
|
||||
// 保存进入编辑的cell
|
||||
clickCellMap: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -107,7 +98,6 @@ export default {
|
||||
this.list.push(newData)
|
||||
}else {
|
||||
this.list = []
|
||||
this.refreshTable()
|
||||
}
|
||||
},
|
||||
list: {
|
||||
@ -146,27 +136,93 @@ export default {
|
||||
});
|
||||
return sums
|
||||
},
|
||||
editData(row, column) {
|
||||
row[column.property + "isShow"] = true
|
||||
//refreshTable是table数据改动时,刷新table的
|
||||
this.refreshTable()
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs[column.property] && this.$refs[column.property].focus()
|
||||
// })
|
||||
/** 鼠标移入cell */
|
||||
handleCellEnter(row, column, cell, event) {
|
||||
const property = column.property
|
||||
if (this.editProp.includes(property)) {
|
||||
cell.querySelector('.item__txt').classList.add('item__txt--hover')
|
||||
}
|
||||
},
|
||||
alterData(row, column) {
|
||||
row[column.property + "isShow"] = false
|
||||
const data = this.list.find(item => item.id === row.id)
|
||||
data.totalPrice = data.newPrice * data.count
|
||||
this.refreshTable()
|
||||
/** 鼠标移出cell */
|
||||
handleCellLeave(row, column, cell, event) {
|
||||
const property = column.property
|
||||
if (this.editProp.includes(property)) {
|
||||
cell.querySelector('.item__txt').classList.remove('item__txt--hover')
|
||||
}
|
||||
},
|
||||
refreshTable() {
|
||||
this.randomKey = Math.random()
|
||||
/** 点击cell */
|
||||
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>
|
||||
|
||||
<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>
|
||||
|
@ -13,16 +13,16 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<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 label="单据号" prop="soNo">
|
||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
||||
</el-form-item>
|
||||
<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 :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corpId" />
|
||||
<CorpChoose v-model="queryParams.corp" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
@ -81,6 +81,17 @@ export default {
|
||||
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() {
|
||||
return {
|
||||
queryParams:{
|
||||
@ -88,9 +99,12 @@ export default {
|
||||
pageSize: 10,
|
||||
searchTimeArray:[],
|
||||
soNo: null,
|
||||
supplier: null,
|
||||
supplierId: null,
|
||||
supplierName: null,
|
||||
corp: null,
|
||||
corpId: null,
|
||||
user: null,
|
||||
userId: null,
|
||||
userName: null,
|
||||
soType: this.soByType ? "01" : "02",
|
||||
@ -130,6 +144,9 @@ export default {
|
||||
// 重置
|
||||
handleResetQuery(){
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.supplier = null
|
||||
this.queryParams.corp = null
|
||||
this.queryParams.user = null
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
<el-input v-model="queryParams.standard" style="width: 18rem" placeholder="请输入规格"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||
<CorpChoose v-model="queryParams.corpId" />
|
||||
<CorpChoose v-model="queryParams.corp" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="soByType" label="所属库位" prop="warehouseId">
|
||||
<WarehouseChoose v-model="queryParams.warehouseId" @selected="getWarehouse"/>
|
||||
@ -81,6 +81,11 @@ export default {
|
||||
required: true
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
'queryParams.corp'(val){
|
||||
this.queryParams.corpId = val ? val.id : null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams:{
|
||||
@ -90,7 +95,8 @@ export default {
|
||||
soNo: null,
|
||||
corpId: null,
|
||||
soiType: this.soByType ? "01" : "02",
|
||||
warehouseId: null
|
||||
warehouseId: null,
|
||||
corp: null,
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
@ -124,6 +130,7 @@ export default {
|
||||
// 重置
|
||||
handleResetQuery(){
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.corp = null
|
||||
this.handleQuery()
|
||||
}
|
||||
}
|
||||
|
@ -13,20 +13,21 @@
|
||||
<el-form-item :label="stByType ? '单据号' : '关键字'" prop="soNo">
|
||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、备注"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调出门店" prop="corpId">
|
||||
<CorpChoose />
|
||||
<el-form-item label="调出门店" prop="outCorpId">
|
||||
<CorpChoose v-model="queryParams.outCorp"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调入门店" prop="corpId">
|
||||
<CorpChoose />
|
||||
<el-form-item label="调入门店" prop="inCorpId">
|
||||
<CorpChoose v-model="queryParams.inCorp"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="">
|
||||
<el-form-item label="审核状态" prop="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-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -38,27 +39,27 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单号" align="center" prop="soNo" width="180" />
|
||||
<el-table-column label="调出门店" align="center" prop="corpName" width="180" />
|
||||
<el-table-column label="调入门店" align="center" prop="corpName" width="180" />
|
||||
<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 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="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="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="itemCount" width="180" />
|
||||
<el-table-column v-if="!stByType" label="退回备注" align="center" prop="itemCount" width="180" />
|
||||
<el-table-column label="单号" align="center" prop="stNo" width="200"/>
|
||||
<el-table-column label="调出门店" align="center" prop="outCorpId" 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 v-if="stByType" label="调拨成本" align="center" prop="totalPrice" 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="discountPrice" 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="thisDebt" width="150"/>
|
||||
<el-table-column label="调拨日期" align="center" prop="stTime" 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 label="状态" align="center" prop="stStatus" width="150"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" 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">
|
||||
<template v-if="stByType" v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit"
|
||||
>修改
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit"-->
|
||||
<!-- >修改-->
|
||||
<!-- </el-button>-->
|
||||
<el-button size="mini" type="text" icon="el-icon-close"
|
||||
>作废
|
||||
</el-button>
|
||||
@ -73,28 +74,45 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||
import {getStPage} from "@/api/repair/stockTransfer/stockTransfer";
|
||||
|
||||
export default {
|
||||
name: "StIndex",
|
||||
components: {CorpChoose},
|
||||
props:{
|
||||
stByType:{
|
||||
props: {
|
||||
stByType: {
|
||||
type: Boolean,
|
||||
defaultValue: 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() {
|
||||
return {
|
||||
queryParams:{
|
||||
stStatus: null
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
stStatus: null,
|
||||
outCorp: null,
|
||||
outCorpId: null,
|
||||
inCorp:null,
|
||||
inCorpId: null,
|
||||
searchTimeArray: [],
|
||||
stNo: null,
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
@ -102,7 +120,26 @@ export default {
|
||||
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>
|
||||
|
||||
|
@ -180,7 +180,7 @@ export default {
|
||||
// 组件初始化
|
||||
init(){
|
||||
// TODO 数据库有问题,先抛异常,后面在解决
|
||||
// this.companyInit()
|
||||
this.companyInit()
|
||||
this.formData = {
|
||||
stNo: null,
|
||||
newCorp: null,
|
||||
|
@ -13,15 +13,15 @@
|
||||
<el-form-item label="关键字" prop="soNo">
|
||||
<el-input v-model="queryParams.soNo" style="width: 18rem" placeholder="请输入单号、商品名称或编码"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调出门店" prop="corpId">
|
||||
<CorpChoose />
|
||||
<el-form-item label="调出门店" prop="outCorpId">
|
||||
<CorpChoose v-model="queryParams.outCorp" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入门店" prop="corpId">
|
||||
<CorpChoose />
|
||||
<el-form-item label="调入门店" prop="inCorpId">
|
||||
<CorpChoose v-model="queryParams.inCorp"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -38,8 +38,8 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="stId" 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 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="remark" width="180" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
/>
|
||||
@ -62,6 +62,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getStiPage} from "@/api/repair/stockTransfer/stockTransferItem";
|
||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||
|
||||
export default {
|
||||
@ -74,16 +75,51 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'queryParams.outCorp'(val){
|
||||
this.queryParams.outCorpId = val ? val.id : null
|
||||
},
|
||||
'queryParams.inCorp'(val){
|
||||
this.queryParams.inCorpId = val ? val.id : null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchTimeArray: [],
|
||||
outCorp: null,
|
||||
outCorpId: null,
|
||||
inCorp: null,
|
||||
inCorpId: null
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
list: [],
|
||||
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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user