|
|
@@ -14,12 +14,12 @@
|
|
|
<el-button @click.stop="getOnRecord(scope.row)" size="small" type="primary">上下架记录</el-button>
|
|
|
<el-button @click.stop="getRoadRecord(scope.row)" size="small" type="primary">路上记录</el-button>
|
|
|
<el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">待采记录</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">上齐</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">上架</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">下架</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">借库</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">加库</el-button>
|
|
|
- <el-button @click.stop="getCgRecord(scope.row)" size="small" type="primary">减库</el-button>
|
|
|
+ <el-button @click.stop="goOn(scope.row)" size="small" type="primary">上齐</el-button>
|
|
|
+ <el-button @click.stop="goUp(scope.row)" size="small" type="primary">上架</el-button>
|
|
|
+ <el-button @click.stop="goOff(scope.row)" size="small" type="primary">下架</el-button>
|
|
|
+ <el-button @click.stop="loanStock(scope.row)" size="small" type="primary">借库</el-button>
|
|
|
+ <el-button @click.stop="addStock(scope.row)" size="small" type="primary">加库</el-button>
|
|
|
+ <el-button @click.stop="delStock(scope.row)" size="small" type="primary">减库</el-button>
|
|
|
</template>
|
|
|
|
|
|
<template #slot-search-option="{scope}">
|
|
|
@@ -36,7 +36,7 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-more-do-btn>
|
|
|
- <el-dropdown size="medium" split-button type="primary" @click="modifyClassFn" @command="doMore">
|
|
|
+ <el-dropdown size="medium" split-button type="primary" @click="batchGoOn" @command="doMore">
|
|
|
上齐
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="developing">开发中</el-dropdown-item>
|
|
|
@@ -99,22 +99,18 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- modifyClassFn(){
|
|
|
+ batchGoOn(){
|
|
|
let that = this
|
|
|
if (this.$util.isEmpty(this.selectedIds)) {
|
|
|
- this.$message.error('请选花材')
|
|
|
+ this.$message.error('请选要上齐项')
|
|
|
return false
|
|
|
}
|
|
|
- if(this.selectedClassId == 0){
|
|
|
- this.$message.error('请选修改后的分类')
|
|
|
- return false
|
|
|
- }
|
|
|
- this.$confirm('确认修改?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
- this.$service.ptCp.batchModifyClass({ids:JSON.stringify(this.selectedIds),classId:this.selectedClassId}).then((res) => {
|
|
|
+ this.$confirm('确认全上齐?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
+ this.$service.bookItemCustom.batchGoOn({ids:JSON.stringify(this.selectedIds)}).then((res) => {
|
|
|
that.$message.success('操作成功')
|
|
|
- that.selectedClassId = 0
|
|
|
- that.selectedClassName = ''
|
|
|
- that.app.refresh({ classStyle:that.classStyle,classId:that.currentCpClassId })
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -123,6 +119,64 @@ export default {
|
|
|
this.$message.error('开发中')
|
|
|
}
|
|
|
},
|
|
|
+ goUp(info){
|
|
|
+ let that = this
|
|
|
+ this.$prompt('请输入数量','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:'数量错误'}).then(({value}) => {
|
|
|
+ this.$service.bookItemCustom.goOn({ id:info.id}).then(data => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ delStock(info){
|
|
|
+ let that = this
|
|
|
+ this.$prompt('请输入数量','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:'数量错误'}).then(({value}) => {
|
|
|
+ this.$service.checkOrder.bookDelStock({bookItemCustomId:info.id,num:value,itemId:info.itemId}).then(data => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addStock(info){
|
|
|
+ let that = this
|
|
|
+ this.$prompt('请输入数量','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:'数量错误'}).then(({value}) => {
|
|
|
+ this.$service.checkOrder.bookAddStock({bookItemCustomId:info.id,num:value,itemId:info.itemId}).then(data => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loanStock(info){
|
|
|
+
|
|
|
+ },
|
|
|
+ goOff(info){
|
|
|
+ let that = this
|
|
|
+ this.$prompt('请输入数量','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:'数量错误'}).then(({value}) => {
|
|
|
+ this.$service.bookItemCustom.goOff({ id:info.id,num:value}).then(data => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goOn(info){
|
|
|
+ let that = this
|
|
|
+ this.$confirm('确认上齐?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
+ this.$service.bookItemCustom.goOn({id:info.id}).then((res) => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ setTimeout(()=>{
|
|
|
+ that.app.refresh({itemId:this.itemId,customId:this.customId})
|
|
|
+ },1500)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
goItemGh(info){
|
|
|
this.bookItemGhsData = {customId:info.customId,customName:info.customName,id:info.id,itemName:info.name,itemId:info.itemId}
|
|
|
setTimeout(() => {
|