This commit is contained in:
xiaofajia 2024-10-26 12:01:55 +08:00
parent 56812a3d60
commit 678e404569
2 changed files with 98 additions and 100 deletions

View File

@ -108,9 +108,9 @@
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)" <el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看 >查看
</el-button> </el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-edit-outline"--> <el-button @click="handleInWares(scope.row)" v-if="scope.row.soStatus === '02'" size="mini" type="text" icon="el-icon-edit-outline"
<!-- >修改--> >入库
<!-- </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>
@ -283,6 +283,10 @@ export default {
async handleShow(row){ async handleShow(row){
const res = await getRepairSoById(row.id) const res = await getRepairSoById(row.id)
await this.$refs.soShow.open(res.data) await this.$refs.soShow.open(res.data)
},
//
handleInWares(row){
} }
} }
} }

View File

@ -76,10 +76,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="type" @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" v-else @click="handlePass" :disabled="selections.length === 0 || selections.filter(item => !item.isStock).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>
<el-button v-if="type" type="primary" @click="handleCreate" :disabled="selections.length === 0"> <el-button v-if="type" type="primary" @click="handleCreate" :disabled="selections.length === 0">
@ -163,7 +165,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="danger" @click="handleSubmit">结算</el-button> <el-button type="primary" @click="handleSubmit">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -253,10 +255,9 @@ export default {
} }
}, },
// truefalse // truefalse
async handleCreate(flag){ async handleCreate() {
this.inStockDialog = true this.inStockDialog = true
if (flag){ this.partList = [...this.selections.map(item => {
this.partList = [...this.items.map(item => {
return { return {
...item.wares, ...item.wares,
count: item.waresCount, count: item.waresCount,
@ -264,16 +265,6 @@ export default {
totalPrice: item.waresCount * item.wares.purPrice totalPrice: item.waresCount * item.wares.purPrice
} }
})] })]
}else {
this.partList = [...this.selections.map(item => {
return {
...item.wares,
count: item.waresCount,
newPrice: item.wares.price,
totalPrice: item.waresCount * item.wares.price
}
})]
}
this.dialogVisible = false this.dialogVisible = false
}, },
async getList() { async getList() {
@ -446,8 +437,10 @@ export default {
userName: res.data.nickname, userName: res.data.nickname,
soTime: parseTime(Date.now(), '{y}-{m}-{d}'), soTime: parseTime(Date.now(), '{y}-{m}-{d}'),
itemCount: this.partList.length, itemCount: this.partList.length,
totalPrice: this.partList.reduce((x, y) => {return x + y.totalPrice}, 0), totalPrice: this.partList.reduce((x, y) => {
soStatus: "03", return x + y.totalPrice
}, 0),
soStatus: "02",
remark: this.remark, remark: this.remark,
} }
this.formData.goodsList = [...this.partList.map(item => { this.formData.goodsList = [...this.partList.map(item => {
@ -470,6 +463,7 @@ export default {
::v-deep .el-table .stock td { ::v-deep .el-table .stock td {
color: #ff0000 !important; /* 红色背景 */ color: #ff0000 !important; /* 红色背景 */
} }
.item { .item {
.item__input { .item__input {
display: none; display: none;