更新代码
This commit is contained in:
parent
f7bdee8d14
commit
a99907fbf2
@ -11,6 +11,7 @@ export function createRepairSo(data){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分页
|
||||||
export function getRepairSoPage(params){
|
export function getRepairSoPage(params){
|
||||||
return request({
|
return request({
|
||||||
url: preUrl + "/page",
|
url: preUrl + "/page",
|
||||||
@ -18,3 +19,12 @@ export function getRepairSoPage(params){
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 作废
|
||||||
|
export function voidSo(data){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/void",
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +1,12 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const preUrl= "/repair/soi"
|
||||||
|
|
||||||
|
// 分页查询
|
||||||
|
export function getSoiPage(params){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/page",
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -10,6 +10,12 @@ import {getCompanyList} from "@/api/base/company";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
props:{
|
||||||
|
value:{
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
corpSelected: undefined,
|
corpSelected: undefined,
|
||||||
@ -19,7 +25,14 @@ export default {
|
|||||||
watch:{
|
watch:{
|
||||||
corpSelected(val) {
|
corpSelected(val) {
|
||||||
const company = this.corpList.find(item => item.id === val);
|
const company = this.corpList.find(item => item.id === val);
|
||||||
this.$emit("selected", company);
|
this.$emit("input", company);
|
||||||
|
},
|
||||||
|
value(val){
|
||||||
|
if (val){
|
||||||
|
this.corpSelected = val.id
|
||||||
|
}else {
|
||||||
|
this.corpSelected = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export default {
|
|||||||
price: "100",
|
price: "100",
|
||||||
type: "不知道",
|
type: "不知道",
|
||||||
unit: "个",
|
unit: "个",
|
||||||
warehouse: "d1",
|
warehouse: "6335b519fde3cabf298e763bc1c38df1",
|
||||||
miniStock: 100,
|
miniStock: 100,
|
||||||
maxStock: 100,
|
maxStock: 100,
|
||||||
stock: 20,
|
stock: 20,
|
||||||
@ -57,7 +57,7 @@ export default {
|
|||||||
price: "10",
|
price: "10",
|
||||||
type: "不知道",
|
type: "不知道",
|
||||||
unit: "个",
|
unit: "个",
|
||||||
warehouse: "d2",
|
warehouse: "6335b519fde3cabf298e763bc1c38df1",
|
||||||
miniStock: 10,
|
miniStock: 10,
|
||||||
maxStock: 10,
|
maxStock: 10,
|
||||||
stock: 5,
|
stock: 5,
|
||||||
|
|||||||
@ -22,6 +22,13 @@ import {getBaseWarehouseList} from "@/api/base/warehouse";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "WarehouseChoose",
|
name: "WarehouseChoose",
|
||||||
|
props:{
|
||||||
|
value:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
required:false
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
warehouseSelected: undefined,
|
warehouseSelected: undefined,
|
||||||
@ -33,6 +40,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
value(val){
|
||||||
|
if (val){
|
||||||
|
this.warehouseSelected = val
|
||||||
|
}else {
|
||||||
|
this.warehouseSelected = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.listWarehouse()
|
this.listWarehouse()
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="queryParams.searchTimeArray"
|
v-model="queryParams.searchTimeArray"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
@ -12,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/>
|
<SupplierChoose v-model="queryParams.supplierId"/>
|
||||||
</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="请输入单号、商品名称或编码"/>
|
||||||
@ -29,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 @selected="getStaff"/>
|
<StaffChoose v-model="queryParams.userId" @selected="getStaff"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose @selected="getCompany"/>
|
<CorpChoose v-model="queryParams.corpId" @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>
|
||||||
@ -55,7 +56,7 @@
|
|||||||
<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="soId" width="200"/>
|
||||||
<el-table-column label="商品名称" align="center" width="180" prop="name"/>
|
<el-table-column label="商品名称" align="center" width="180" prop="name"/>
|
||||||
<el-table-column label="规格" align="center" width="180" prop="name"/>
|
<el-table-column label="规格" align="center" width="180" prop="name"/>
|
||||||
<el-table-column label="商品编码" align="center" width="180" prop="name"/>
|
<el-table-column label="商品编码" align="center" width="180" prop="name"/>
|
||||||
@ -84,29 +85,38 @@
|
|||||||
<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="soNo" width="200"/>
|
||||||
<el-table-column label="数量" align="center" prop="itemCount" 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 label="金额" align="center" prop="totalPrice" width="150"/>
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150"/>
|
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150"/>
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150"/>
|
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="200"/>
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150"/>
|
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150"/>
|
||||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150"/>
|
<el-table-column label="登记时间" align="center" prop="createTime" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="门店" align="center" prop="corpName" width="180"/>
|
<el-table-column label="门店" align="center" prop="corpName" width="180"/>
|
||||||
<el-table-column v-if="soByType" label="状态" align="center" prop="soStatus" width="150"/>
|
<el-table-column v-if="soByType" label="状态" align="center" prop="soStatus" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.REPAIR_SO_STATUS" :value="scope.row.soStatus"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<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"
|
<el-button size="mini" type="text" icon="el-icon-close" @click="handleVoidSo(scope.row)"
|
||||||
>作废
|
>作废
|
||||||
</el-button>
|
</el-button>
|
||||||
</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: 3rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -117,7 +127,8 @@ import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
|||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||||
import {DICT_TYPE} from "@/utils/dict";
|
import {DICT_TYPE} from "@/utils/dict";
|
||||||
import {getRepairSoPage} from "@/api/repair/stockOperate/stockOperate";
|
import {getRepairSoPage, voidSo} from "@/api/repair/stockOperate/stockOperate";
|
||||||
|
import {getSoiPage} from "@/api/repair/stockOperate/stockOperateItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoIndex",
|
name: "SoIndex",
|
||||||
@ -157,7 +168,14 @@ export default {
|
|||||||
corpId: null,
|
corpId: null,
|
||||||
userId: null,
|
userId: null,
|
||||||
userName: null,
|
userName: null,
|
||||||
soType: this.soByType ? "01" : "02"
|
soType: this.soByType ? "01" : "02",
|
||||||
|
purchaseType: this.goodsYes ? "02" : "01",
|
||||||
|
goodsType: this.goodsYes ? "1" : "0"
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
remark: null,
|
||||||
|
id: null,
|
||||||
|
soStatus: "06"
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
list: [],
|
list: [],
|
||||||
@ -171,6 +189,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 分页
|
// 分页
|
||||||
async pageSo() {
|
async pageSo() {
|
||||||
|
if (this.soByType && this.goodsYes) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getSoiPage(this.queryParams)
|
||||||
|
this.list = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getRepairSoPage(this.queryParams)
|
const res = await getRepairSoPage(this.queryParams)
|
||||||
@ -179,9 +207,12 @@ export default {
|
|||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 搜索按钮
|
// 搜索按钮
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.pageSo()
|
||||||
},
|
},
|
||||||
// 搜索重置
|
// 搜索重置
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
@ -196,6 +227,25 @@ export default {
|
|||||||
// 门店选择
|
// 门店选择
|
||||||
getCompany(data) {
|
getCompany(data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
},
|
||||||
|
// 作废
|
||||||
|
handleVoidSo(row) {
|
||||||
|
this.$prompt('作废备注', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
}).then(({value}) => {
|
||||||
|
this.formData.id = row.id
|
||||||
|
this.formData.remark = value
|
||||||
|
this.doVoidSo()
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async doVoidSo() {
|
||||||
|
try {
|
||||||
|
await voidSo(this.formData)
|
||||||
|
this.$modal.msgSuccess("作废成功")
|
||||||
|
await this.pageSo()
|
||||||
|
}catch{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="作废时间" prop="searchTimeArray">
|
<el-form-item label="作废时间" prop="searchTimeArray">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="queryParams.searchTimeArray"
|
v-model="queryParams.searchTimeArray"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
@ -12,20 +13,20 @@
|
|||||||
</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 />
|
<SupplierChoose v-model="queryParams.supplierId" />
|
||||||
</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 @selected="getStaff"/>
|
<StaffChoose v-model="queryParams.userId" @selected="getStaff"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose />
|
<CorpChoose v-model="queryParams.corpId" />
|
||||||
</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="handleResetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
@ -38,20 +39,28 @@
|
|||||||
<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="soNo" width="200" />
|
||||||
<el-table-column label="数量" align="center" width="150" prop="name" />
|
<el-table-column label="数量" align="center" width="150" prop="itemCount" />
|
||||||
<el-table-column label="金额" align="center" prop="totalPrice" width="150" />
|
<el-table-column label="金额" align="center" prop="totalPrice" width="150" />
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150" />
|
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="userName" width="150" />
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150" />
|
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="150" />
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150" />
|
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150" />
|
||||||
<el-table-column label="登记时间" align="center" prop="createTime" width="150" />
|
<el-table-column label="登记时间" align="center" prop="createTime" width="150">
|
||||||
<el-table-column label="作废时间" align="center" prop="createTime" width="150" />
|
<template slot-scope="scope">
|
||||||
<el-table-column label="作废人" align="center" prop="createTime" width="150" />
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="作废时间" align="center" prop="updateTime" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="作废人" align="center" prop="updater" width="150" />
|
||||||
<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="remark" 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 style="margin-bottom: 3rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -60,6 +69,7 @@
|
|||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue";
|
||||||
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
|
||||||
|
import {getRepairSoPage} from "@/api/repair/stockOperate/stockOperate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoVoid",
|
name: "SoVoid",
|
||||||
@ -82,7 +92,10 @@ export default {
|
|||||||
supplierName: null,
|
supplierName: null,
|
||||||
corpId: null,
|
corpId: null,
|
||||||
userId: null,
|
userId: null,
|
||||||
userName: null
|
userName: null,
|
||||||
|
soType: this.soByType ? "01" : "02",
|
||||||
|
purchaseType: this.goodsYes ? "02" : "01",
|
||||||
|
soStatus: "06"
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -90,12 +103,35 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.pageSo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async pageSo(){
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getRepairSoPage(this.queryParams)
|
||||||
|
this.list = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 子组件回调
|
// 子组件回调
|
||||||
getStaff(data){
|
getStaff(data){
|
||||||
this.queryParams.userId = data.id
|
this.queryParams.userId = data.id
|
||||||
this.queryParams.userName = data.name
|
this.queryParams.userName = data.name
|
||||||
},
|
},
|
||||||
|
// 搜索
|
||||||
|
handleQuery(){
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.pageSo()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleResetQuery(){
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.handleQuery()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
<el-form-item :label="soByType ? '采购时间' : '领料时间'" prop="searchTimeArray">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="queryParams.searchTimeArray"
|
v-model="queryParams.searchTimeArray"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
@ -14,18 +15,18 @@
|
|||||||
<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="soNo">
|
<el-form-item v-if="soByType" label="规格" prop="standard">
|
||||||
<el-input v-model="queryParams.soNo" 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 />
|
<CorpChoose v-model="queryParams.corpId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="soByType" label="所属库位" prop="corpId">
|
<el-form-item v-if="soByType" label="所属库位" prop="warehouseId">
|
||||||
<WarehouseChoose @selected="getWarehouse"/>
|
<WarehouseChoose v-model="queryParams.warehouseId" @selected="getWarehouse"/>
|
||||||
</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="handleResetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
@ -44,7 +45,7 @@
|
|||||||
<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="soId" width="200" />
|
||||||
<el-table-column label="商品名称" align="center" prop="soNo" width="180" />
|
<el-table-column label="商品名称" align="center" prop="soNo" width="180" />
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="soNo" width="180" />
|
<el-table-column :label="soByType ? '采购员' : '领料人'" 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" />
|
||||||
@ -68,6 +69,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
|
||||||
import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
|
import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue";
|
||||||
|
import {getSoiPage} from "@/api/repair/stockOperate/stockOperateItem";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SoiTable",
|
name: "SoiTable",
|
||||||
@ -87,6 +89,8 @@ export default {
|
|||||||
searchTimeArray:[],
|
searchTimeArray:[],
|
||||||
soNo: null,
|
soNo: null,
|
||||||
corpId: null,
|
corpId: null,
|
||||||
|
soiType: this.soByType ? "01" : "02",
|
||||||
|
warehouseId: null
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -94,10 +98,34 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.pageSoi()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 库位选择
|
// 库位选择
|
||||||
getWarehouse(data){
|
getWarehouse(data){
|
||||||
},
|
},
|
||||||
|
// 分页
|
||||||
|
async pageSoi(){
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getSoiPage(this.queryParams)
|
||||||
|
this.list = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 搜索
|
||||||
|
handleQuery(){
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.pageSoi()
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
handleResetQuery(){
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.handleQuery()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user