配件领退修改
This commit is contained in:
parent
bcf45748ac
commit
2ef00ca02b
@ -36,3 +36,19 @@ export function getRepairSoById(id){
|
|||||||
method: "get"
|
method: "get"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 员工确认领料
|
||||||
|
export function confirmGet(id){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/confirmGet?id=" + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 员工确认退料
|
||||||
|
export function confirmBack(id){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/confirmBack?id=" + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -18,3 +18,11 @@ export function getRepairSoiByIds(ids){
|
|||||||
method: "get"
|
method: "get"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 按主表ID查
|
||||||
|
export function getRepairSoiBySoId(soId){
|
||||||
|
return request({
|
||||||
|
url: preUrl + "/getBySoId?soId=" + soId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
37
src/views/repair/stockOperate/BackStock.vue
Normal file
37
src/views/repair/stockOperate/BackStock.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-tabs v-model="activeTab">
|
||||||
|
<el-tab-pane label="退料单据" name="receive">
|
||||||
|
<SoIndex :so-by-type="soByType" :is-back="isBack"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="作废单据" name="voidReceive">
|
||||||
|
<SoVoid :so-by-type="soByType" :is-back="isBack"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="退料明细" name="detailReceive">
|
||||||
|
<SoiTable :so-by-type="soByType" :is-back="isBack"/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SoVoid from "@/views/repair/stockOperate/Components/SoVoid.vue";
|
||||||
|
import SoiTable from "@/views/repair/stockOperate/Components/SoiTable.vue";
|
||||||
|
import SoIndex from "@/views/repair/stockOperate/Components/SoIndex.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BackStock",
|
||||||
|
components: {SoIndex, SoiTable, SoVoid},
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
activeTab: 'receive',
|
||||||
|
soByType: false,
|
||||||
|
isBack: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<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 ? '采购时间' : !isBack ? '领料时间' : '退料时间'" prop="searchTimeArray">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="queryParams.searchTimeArray"
|
v-model="queryParams.searchTimeArray"
|
||||||
@ -29,10 +29,10 @@
|
|||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</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="!isBack ? '领料人' : '退料人'" prop="userId">
|
||||||
<StaffChoose v-model="queryParams.user" @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 v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose v-model="queryParams.corp" @selected="getCompany"/>
|
<CorpChoose v-model="queryParams.corp" @selected="getCompany"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -88,15 +88,15 @@
|
|||||||
<el-table-column label="单号" align="center" prop="soNo" width="200"/>
|
<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 ? '采购员' : !isBack ? '领料人' : '退料人'" align="center" prop="userName" width="150"/>
|
||||||
<el-table-column v-if="soByType" label="供应商" align="center" prop="supplierName" width="200"/>
|
<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 ? '入库时间' : !isBack ? '领料时间' : '退料时间'" 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">
|
<template slot-scope="scope">
|
||||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="门店" align="center" prop="corpName" width="180"/>
|
<el-table-column v-if="!isBack" 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">
|
<template slot-scope="scope">
|
||||||
<dict-tag :type="DICT_TYPE.REPAIR_SO_STATUS" :value="scope.row.soStatus"/>
|
<dict-tag :type="DICT_TYPE.REPAIR_SO_STATUS" :value="scope.row.soStatus"/>
|
||||||
@ -122,7 +122,7 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SoShow :so-by-type="soByType" ref="soShow" />
|
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -159,6 +159,9 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
isBack:{
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -209,17 +212,22 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 分页
|
// 分页
|
||||||
async pageSo() {
|
async pageSo() {
|
||||||
|
this.queryParams.soType = null
|
||||||
|
this.queryParams.purchaseType = null
|
||||||
if (this.soByType && this.goodsYes){
|
if (this.soByType && this.goodsYes){
|
||||||
this.queryParams.soType = "03"
|
this.queryParams.soType = "03"
|
||||||
this.queryParams.purchaseType = "02"
|
this.queryParams.purchaseType = "02"
|
||||||
}
|
}
|
||||||
if (this.soByType && !this.goodsYes){
|
else if (this.soByType && !this.goodsYes){
|
||||||
this.queryParams.soType = "01"
|
|
||||||
this.queryParams.soType = "01"
|
this.queryParams.soType = "01"
|
||||||
|
this.queryParams.purchaseType = "01"
|
||||||
}
|
}
|
||||||
if (!this.soByType){
|
else if (!this.soByType && !this.isBack){
|
||||||
this.queryParams.soType = "02"
|
this.queryParams.soType = "02"
|
||||||
}
|
}
|
||||||
|
else if (this.isBack){
|
||||||
|
this.queryParams.soType = '04'
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getRepairSoPage(this.queryParams)
|
const res = await getRepairSoPage(this.queryParams)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
{{soByType ? '采购员' : '领料人'}}
|
{{soByType ? '采购员' : !isBack ? '领料人':'退料人'}}
|
||||||
</template>
|
</template>
|
||||||
{{info.userName}}
|
{{info.userName}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
{{soByType ? '入库时间' : '领料时间'}}
|
{{soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'}}
|
||||||
</template>
|
</template>
|
||||||
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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 :label="soByType ? '入库时间' : '领料时间'" align="center" prop="soTime" width="150">
|
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="soTime" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
{{parseTime(info.soTime, '{y}-{m}-{d}')}}
|
||||||
</template>
|
</template>
|
||||||
@ -142,6 +142,9 @@ export default {
|
|||||||
soByType:{
|
soByType:{
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
},
|
||||||
|
isBack:{
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
<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="!isBack ? '领料人' : '退料人'" prop="userId">
|
||||||
<StaffChoose v-model="queryParams.user" @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 v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose v-model="queryParams.corp" />
|
<CorpChoose v-model="queryParams.corp" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -42,9 +42,9 @@
|
|||||||
<el-table-column label="单号" align="center" prop="soNo" width="200" />
|
<el-table-column label="单号" align="center" prop="soNo" width="200" />
|
||||||
<el-table-column label="数量" align="center" width="150" prop="itemCount" />
|
<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 ? '采购员' : !isBack ? '领料人' : '退料人'" 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 ? '入库时间' : !isBack ? '领料时间' : '退料时间'" 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">
|
<template slot-scope="scope">
|
||||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
|
||||||
@ -70,7 +70,7 @@
|
|||||||
<pagination @pagination="pageSo" style="margin-bottom: 3rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
<pagination @pagination="pageSo" style="margin-bottom: 3rem" v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SoShow :so-by-type="soByType" ref="soShow" />
|
<SoShow :so-by-type="soByType" :is-back="isBack" ref="soShow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -90,6 +90,9 @@ export default {
|
|||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
isBack:{
|
||||||
|
type: Boolean
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'queryParams.supplier'(val){
|
'queryParams.supplier'(val){
|
||||||
@ -133,6 +136,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async pageSo(){
|
async pageSo(){
|
||||||
try {
|
try {
|
||||||
|
if (this.isBack){
|
||||||
|
this.queryParams.soType = "04"
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getRepairSoPage(this.queryParams)
|
const res = await getRepairSoPage(this.queryParams)
|
||||||
this.list = res.data.records
|
this.list = res.data.records
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<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 ? '采购时间' : !isBack ? '领料时间' : '退料时间'" prop="searchTimeArray">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="queryParams.searchTimeArray"
|
v-model="queryParams.searchTimeArray"
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<el-form-item label="关键字" prop="query">
|
<el-form-item label="关键字" prop="query">
|
||||||
<el-input v-model="queryParams.query" style="width: 18rem" placeholder="请输入单号、商品名称、编码或规格"/>
|
<el-input v-model="queryParams.query" style="width: 18rem" placeholder="请输入单号、商品名称、编码或规格"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
<el-form-item v-if="!isBack" :label="soByType ? '采购门店' : '领料门店'" prop="corpId">
|
||||||
<CorpChoose v-model="queryParams.corp" />
|
<CorpChoose v-model="queryParams.corp" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="soByType" label="所属库位" prop="wareId">
|
<el-form-item v-if="soByType" label="所属库位" prop="wareId">
|
||||||
@ -28,11 +28,11 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button type="primary" plain icon="el-icon-download" size="mini"
|
<!-- <el-button type="primary" plain icon="el-icon-download" size="mini"-->
|
||||||
>导出
|
<!-- >导出-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
@ -44,7 +44,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单号" align="center" prop="so.soNo" width="200" />
|
<el-table-column label="单号" align="center" prop="so.soNo" width="200" />
|
||||||
<el-table-column label="商品名称" align="center" prop="repairWares.name" width="180" />
|
<el-table-column label="商品名称" align="center" prop="repairWares.name" width="180" />
|
||||||
<el-table-column :label="soByType ? '采购员' : '领料人'" align="center" prop="so.userName" width="180" />
|
<el-table-column :label="soByType ? '采购员' : !isBack ? '领料人' : '退料人'" align="center" prop="so.userName" width="180" />
|
||||||
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
|
<el-table-column label="商品编码" align="center" prop="repairWares.code" width="180" />
|
||||||
<el-table-column v-if="soByType" label="条形码" align="center" prop="repairWares.barCode" width="180" />
|
<el-table-column v-if="soByType" label="条形码" align="center" prop="repairWares.barCode" width="180" />
|
||||||
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
|
<el-table-column label="规格" align="center" prop="repairWares.model" width="180" />
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属门店" align="center" prop="so.corpId" width="180" />
|
<el-table-column label="所属门店" align="center" prop="so.corpId" width="180" />
|
||||||
<el-table-column :label="soByType ? '入库时间' : '领料时间'" align="center" prop="so.createTime" width="150">
|
<el-table-column :label="soByType ? '入库时间' : !isBack ? '领料时间' : '退料时间'" align="center" prop="so.createTime" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{parseTime(scope.row.so.createTime, '{y}-{m}-{d}')}}
|
{{parseTime(scope.row.so.createTime, '{y}-{m}-{d}')}}
|
||||||
</template>
|
</template>
|
||||||
@ -90,6 +90,9 @@ export default {
|
|||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
isBack:{
|
||||||
|
type: Boolean
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'queryParams.corp'(val){
|
'queryParams.corp'(val){
|
||||||
@ -126,6 +129,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 分页
|
// 分页
|
||||||
async pageSoi(){
|
async pageSoi(){
|
||||||
|
if (this.isBack){
|
||||||
|
this.queryParams.soiType = "04"
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const res = await getSoiPage(this.queryParams)
|
const res = await getSoiPage(this.queryParams)
|
||||||
|
@ -57,20 +57,31 @@
|
|||||||
<el-table-column type="selection" width="80" align="center" />
|
<el-table-column type="selection" width="80" align="center" />
|
||||||
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
||||||
<el-table-column label="领料数量" align="center" prop="waresCount" width="180">
|
<el-table-column label="领料数量" v-if="type" align="center" prop="waresCount" width="180">
|
||||||
|
<div class="item" slot-scope="scope">
|
||||||
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
||||||
|
placeholder="请输入数量"></el-input>
|
||||||
|
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
||||||
|
</div>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="库存数量" v-if="type" align="center" prop="wares.stock" width="180"/>
|
||||||
|
<el-table-column label="已领数量" v-if="!type" align="center" prop="waresAlreadyCount" width="180"/>
|
||||||
|
<el-table-column label="退料数量" v-if="!type" align="center" prop="waresCount" width="180">
|
||||||
<div class="item" slot-scope="scope">
|
<div class="item" slot-scope="scope">
|
||||||
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
<el-input @blur="save(scope.row)" class="item__input" v-model="scope.row.waresCount"
|
||||||
placeholder="请输入数量"></el-input>
|
placeholder="请输入数量"></el-input>
|
||||||
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
<span class="item__txt">{{ scope.row.waresCount }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" align="center" prop="wares.stock" width="180"/>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
<el-button type="primary" v-if="type" @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
||||||
通知领取
|
通知领料
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="handleCreate" :disabled="selections.length === 0">
|
<el-button type="primary" v-else @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).length !== 0">
|
||||||
|
通知退料
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="type" type="primary" @click="handleCreate" :disabled="selections.length === 0">
|
||||||
采购
|
采购
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -179,7 +190,8 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
query: null,
|
query: null,
|
||||||
type: this.type ? "01" : "02"
|
type: "01",
|
||||||
|
isBack: this.type ? null : true
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -207,29 +219,30 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
// 通过 true是全部、false是选择
|
// 通过 true是全部、false是选择
|
||||||
async handlePass(){
|
async handlePass(){
|
||||||
// 生成领料单
|
// 生成领料单、退料单
|
||||||
if (this.type){
|
|
||||||
this.formData.repairSo = {
|
this.formData.repairSo = {
|
||||||
soType: "02",
|
soType: this.type ? "02" : "04",
|
||||||
soNo: createUniqueCodeByHead("LL"),
|
soNo: createUniqueCodeByHead(this.type ? "LL" : "TL"),
|
||||||
userId: this.formData.repairId,
|
userId: this.formData.repairId,
|
||||||
userName: this.formData.repairName,
|
userName: this.formData.repairName,
|
||||||
soTime: parseTime(Date.now(), '{y}-{m}-{d}'),
|
soTime: parseTime(Date.now(), '{y}-{m}-{d}'),
|
||||||
soStatus: "04",
|
soStatus: this.type ? "04" : "07",
|
||||||
purchaseType: "01"
|
// purchaseType: "01"
|
||||||
}
|
}
|
||||||
this.formData.repairSois = [...this.selections.map(item => {
|
this.formData.repairSois = [...this.selections.map(item => {
|
||||||
return {
|
return {
|
||||||
soiType: '02',
|
soiType: this.type ? '02' : "04",
|
||||||
goodsId: item.waresId,
|
goodsId: item.waresId,
|
||||||
goodsCount: item.waresCount,
|
goodsCount: item.waresCount,
|
||||||
}
|
}
|
||||||
})]
|
})]
|
||||||
|
if (this.type){
|
||||||
this.formData.items = [...this.selections.map(item => {
|
this.formData.items = [...this.selections.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}
|
}
|
||||||
})]
|
})]
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await pass(this.formData)
|
await pass(this.formData)
|
||||||
this.$modal.msgSuccess("处理成功")
|
this.$modal.msgSuccess("处理成功")
|
||||||
@ -237,23 +250,6 @@ export default {
|
|||||||
}finally {
|
}finally {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
// 退料方法
|
|
||||||
this.formData = {}
|
|
||||||
this.formData.items = [...this.selections.map(item => {
|
|
||||||
return {
|
|
||||||
id: item.id,
|
|
||||||
waresStatus: "05"
|
|
||||||
}
|
|
||||||
})]
|
|
||||||
try {
|
|
||||||
await passBackTicketWares(this.formData)
|
|
||||||
this.$modal.msgSuccess("处理成功")
|
|
||||||
await this.getList()
|
|
||||||
}finally {
|
|
||||||
this.dialogVisible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 生成采购 true是全部、false是选择
|
// 生成采购 true是全部、false是选择
|
||||||
async handleCreate(flag){
|
async handleCreate(flag){
|
||||||
@ -310,19 +306,12 @@ export default {
|
|||||||
const data = {twId: row.id}
|
const data = {twId: row.id}
|
||||||
const res = await listTwItem(data)
|
const res = await listTwItem(data)
|
||||||
this.items = res.data
|
this.items = res.data
|
||||||
// 库存判断
|
|
||||||
this.items.forEach(item => {
|
this.items.forEach(item => {
|
||||||
const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount
|
const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount
|
||||||
item.waresCount = count
|
item.waresCount = this.type ? count : item.waresAlreadyCount
|
||||||
item.isStock = count <= item.wares.stock
|
item.isStock = this.type ? count <= item.wares.stock : true
|
||||||
})
|
})
|
||||||
// 只要未领料的
|
this.items = this.items.filter(item => this.type ? item.waresStatus === '02' : item.waresAlreadyCount)
|
||||||
if (this.type){
|
|
||||||
this.items = this.items.filter(item => item.waresStatus === '02')
|
|
||||||
}else {
|
|
||||||
// 未领料的不要
|
|
||||||
this.items = this.items.filter(item => item.waresStatus !== '02')
|
|
||||||
}
|
|
||||||
}finally {
|
}finally {
|
||||||
this.dialogLoading = false
|
this.dialogLoading = false
|
||||||
}
|
}
|
||||||
@ -404,7 +393,11 @@ export default {
|
|||||||
/** 保存数据 */
|
/** 保存数据 */
|
||||||
save(row) {
|
save(row) {
|
||||||
// 更新表格的数据
|
// 更新表格的数据
|
||||||
row.isStock = row.waresCount <= row.wares.stock
|
row.isStock = this.type ? row.waresCount <= row.wares.stock : row.waresCount <= row.waresAlreadyCount
|
||||||
|
if (!this.type && !row.isStock){
|
||||||
|
this.$modal.msgWarning("退料数量不能超过领取数量")
|
||||||
|
row.waresCount = row.waresAlreadyCount
|
||||||
|
}
|
||||||
row.totalPrice = row.count * row.newPrice
|
row.totalPrice = row.count * row.newPrice
|
||||||
const id = row.id
|
const id = row.id
|
||||||
// 取消本行所有cell的编辑状态
|
// 取消本行所有cell的编辑状态
|
||||||
@ -412,6 +405,7 @@ export default {
|
|||||||
this.cancelEditable(cell)
|
this.cancelEditable(cell)
|
||||||
})
|
})
|
||||||
this.clickCellMap[id] = []
|
this.clickCellMap[id] = []
|
||||||
|
this.selections = []
|
||||||
this.tableKey++
|
this.tableKey++
|
||||||
},
|
},
|
||||||
changeWare(row) {
|
changeWare(row) {
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
<el-form-item label="关键字" prop="query">
|
<el-form-item label="关键字" prop="query">
|
||||||
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.query"/>
|
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.query"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<!-- <el-form-item label="状态" prop="status">-->
|
||||||
<el-select v-model="queryParams.status">
|
<!-- <el-select v-model="queryParams.status">-->
|
||||||
<el-option v-for="item in this.getDictDatas(DICT_TYPE.TICKET_WARES_STATUS)" :key="item.value" :label="item.label" :value="item.value" />
|
<!-- <el-option v-for="item in this.getDictDatas(DICT_TYPE.TICKET_WARES_STATUS)" :key="item.value"-->
|
||||||
</el-select>
|
<!-- :label="item.label" :value="item.value"/>-->
|
||||||
</el-form-item>
|
<!-- </el-select>-->
|
||||||
|
<!-- </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>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -36,19 +37,22 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark"/>
|
<el-table-column label="备注" align="center" prop="remark"/>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.status !== '01' || userRole !== 'service_advisor'" type="text" size="mini" icon="el-icon-view" @click="handleShow(scope.row)">
|
<el-button v-if="scope.row.status !== '01' || userRole !== 'service_advisor'" type="text" size="mini"
|
||||||
|
icon="el-icon-view" @click="handleShow(scope.row)">
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="(userRole === 'service_advisor' || userRole === 'general_inspection') && scope.row.status === '01'" @click="handleAudit(scope.row)" type="text" size="mini" icon="el-icon-s-check">
|
<el-button
|
||||||
|
v-if="(userRole === 'service_advisor' || userRole === 'general_inspection') && scope.row.status === '01'"
|
||||||
|
@click="handleAudit(scope.row)" type="text" size="mini" icon="el-icon-s-check">
|
||||||
审核
|
审核
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- todo 待完成 -->
|
<!-- <!– todo 待完成 –>-->
|
||||||
<el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '01'" type="text" size="mini" icon="el-icon-finished">
|
<!-- <el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '01'" type="text" size="mini" icon="el-icon-finished">-->
|
||||||
领料确认
|
<!-- 领料确认-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '02'" type="text" size="mini" icon="el-icon-finished">
|
<!-- <el-button @click="handleGet(scope.row)" v-if="userRole === 'repair_staff' && scope.row.status !== '01' && scope.row.type === '02'" type="text" size="mini" icon="el-icon-finished">-->
|
||||||
退料确认
|
<!-- 退料确认-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -59,7 +63,8 @@
|
|||||||
<TicketWaresShow ref="ticketWaresShow" :user-role="userRole" @success="getList" :type="type"/>
|
<TicketWaresShow ref="ticketWaresShow" :user-role="userRole" @success="getList" :type="type"/>
|
||||||
|
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||||
<el-table el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true" @selection-change="handleSelect">
|
<el-table el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true"
|
||||||
|
@selection-change="handleSelect">
|
||||||
<el-table-column type="selection" width="80" align="center"/>
|
<el-table-column type="selection" width="80" align="center"/>
|
||||||
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
<el-table-column label="名称" align="center" prop="waresName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
<el-table-column label="规格" align="center" prop="wares.model" width="180"/>
|
||||||
@ -96,7 +101,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
query: null,
|
query: null,
|
||||||
type: this.type ? "01" : "02",
|
type: this.type ? "01" : "02",
|
||||||
status: null
|
status: "01"
|
||||||
},
|
},
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -187,7 +192,8 @@ export default {
|
|||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
this.$modal.msgSuccess(this.type ? "领料成功" : "退料成功")
|
this.$modal.msgSuccess(this.type ? "领料成功" : "退料成功")
|
||||||
await this.getList()
|
await this.getList()
|
||||||
}catch{}
|
} catch {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,15 @@
|
|||||||
<el-tab-pane label="已完成工单" name="finish">
|
<el-tab-pane label="已完成工单" name="finish">
|
||||||
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
|
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="userRole !== 'repair_staff' ? '配件申请单' : '领退料确认'" name="getApply">
|
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
|
||||||
<TicketWares :type="true" :user-role="userRole"/>
|
<TicketWares :type="true" :user-role="userRole"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="finishGetWares" label="领料确认" v-if="userRole === 'repair_staff'">
|
||||||
|
<GetAndBackWares :type="true" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
|
||||||
|
<GetAndBackWares :type="false" />
|
||||||
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
|
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
|
||||||
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
|
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
|
||||||
<!-- </el-tab-pane>-->
|
<!-- </el-tab-pane>-->
|
||||||
@ -21,10 +27,11 @@
|
|||||||
import TicketManagerItem from "@/views/repair/tickets/Components/TicketManagerItem.vue";
|
import TicketManagerItem from "@/views/repair/tickets/Components/TicketManagerItem.vue";
|
||||||
import {getUserRole} from "@/api/repair/tickets/Tickets";
|
import {getUserRole} from "@/api/repair/tickets/Tickets";
|
||||||
import TicketWares from "@/views/repair/tickets/Components/TicketWares.vue";
|
import TicketWares from "@/views/repair/tickets/Components/TicketWares.vue";
|
||||||
|
import GetAndBackWares from "@/views/repair/tickets/form/GetAndBackWares.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TicketManager",
|
name: "TicketManager",
|
||||||
components: {TicketWares, TicketManagerItem},
|
components: {GetAndBackWares, TicketWares, TicketManagerItem},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: 'unFinish',
|
activeTab: 'unFinish',
|
||||||
|
165
src/views/repair/tickets/form/GetAndBackWares.vue
Normal file
165
src/views/repair/tickets/form/GetAndBackWares.vue
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<el-form-item label="关键字" prop="soNo">
|
||||||
|
<el-input style="width: 20rem" type="text" placeholder="工单号、车牌号、联系电话" v-model="queryParams.soNo"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- 操作 -->
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<right-toolbar :showSearch.sync="showSearch"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
|
<el-table-column label="序号" align="center" width="80">
|
||||||
|
<template scope="scope">
|
||||||
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单号" align="center" prop="soNo"/>
|
||||||
|
<el-table-column label="数量" align="center" prop="itemCount"/>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="mini"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="showItem(scope.row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<el-dialog :title="type ? '领料确认' : '退料确认'" :visible.sync="dialogVisible" width="80%" v-dialogDrag append-to-body>
|
||||||
|
<el-table v-loading="dialogLoading" :data="items" :stripe="true" :show-overflow-tooltip="true">
|
||||||
|
<el-table-column label="序号" align="center" width="80">
|
||||||
|
<template scope="scope">
|
||||||
|
<span>{{ scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称" align="center" prop="repairWares.name" />
|
||||||
|
<el-table-column label="商品编码" align="center" prop="repairWares.code" />
|
||||||
|
<el-table-column label="规格" align="center" prop="repairWares.model" />
|
||||||
|
<el-table-column label="数量" align="center" prop="goodsCount" />
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" size="small" @click="handleConfirm">
|
||||||
|
确认
|
||||||
|
</el-button>
|
||||||
|
<el-button type="info" size="small" @click="handleVoid">
|
||||||
|
作废
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRepairSoPage, voidSo, confirmGet, confirmBack} from "@/api/repair/stockOperate/stockOperate";
|
||||||
|
import {getUserProfile} from "@/api/system/user";
|
||||||
|
import {getRepairSoiBySoId} from "@/api/repair/stockOperate/stockOperateItem";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "GetAndBackWares",
|
||||||
|
props: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
soType: this.type ? "02" : "04",
|
||||||
|
soStatus: this.type ? "04" : "07",
|
||||||
|
soNo: null,
|
||||||
|
},
|
||||||
|
showSearch: true,
|
||||||
|
loading: false,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
userId: null,
|
||||||
|
dialogVisible: false,
|
||||||
|
items: [],
|
||||||
|
dialogLoading: false,
|
||||||
|
formData:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
async getList(){
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
if (!this.userId){
|
||||||
|
const res = await getUserProfile()
|
||||||
|
this.userId = res.data.id
|
||||||
|
}
|
||||||
|
this.queryParams['userId'] = this.userId
|
||||||
|
const res = await getRepairSoPage(this.queryParams)
|
||||||
|
this.list = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleQuery(){
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
resetQuery(){
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
async showItem(row){
|
||||||
|
this.formData['id'] = row.id
|
||||||
|
try{
|
||||||
|
this.items = []
|
||||||
|
this.dialogVisible = true
|
||||||
|
this.dialogLoading = true
|
||||||
|
const res = await getRepairSoiBySoId(row.id)
|
||||||
|
this.items = res.data
|
||||||
|
}finally {
|
||||||
|
this.dialogLoading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirm(){
|
||||||
|
if (this.type){
|
||||||
|
try {
|
||||||
|
await confirmGet(this.formData.id)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$modal.msgSuccess("操作成功")
|
||||||
|
await this.getList()
|
||||||
|
}catch{}
|
||||||
|
}else {
|
||||||
|
await confirmBack(this.formData.id)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$modal.msgSuccess("操作成功")
|
||||||
|
await this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 作废
|
||||||
|
async handleVoid(){
|
||||||
|
try {
|
||||||
|
await this.$modal.confirm("确认作废该单据?")
|
||||||
|
this.formData['soStatus'] = '06'
|
||||||
|
await voidSo(this.formData)
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$modal.msgSuccess("操作成功")
|
||||||
|
await this.getList()
|
||||||
|
}catch {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user