Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-09-29 16:30:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
62b9403a28d87ed51077f418870411cc8898687f
62b9403a
1 parent
c872eaac
增加特殊规则释放舱位重量提示
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
26 deletions
src/api/supserAllocation.js
src/views/systemConfig/superAllocation/index.vue
src/api/supserAllocation.js
View file @
62b9403
...
...
@@ -59,4 +59,16 @@ export function changeStatusById(data) {
method
:
'post'
,
data
:
data
})
}
//特殊规则获取释放仓位重量
/**
* @param id ID *
*/
export
function
getReleaseWeight
(
data
)
{
return
request
({
url
:
'/shipperAccount/getReleaseWeight'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
...
...
src/views/systemConfig/superAllocation/index.vue
View file @
62b9403
...
...
@@ -48,7 +48,7 @@
</template>
<script>
import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById } from "@/api/supserAllocation"
import { queryShipperAccountRule, changeStatusById, queryShipperAccountRuleById
, getReleaseWeight
} from "@/api/supserAllocation"
import Dialog from './dialog.vue';
export default {
...
...
@@ -133,22 +133,30 @@ export default {
},
//删除
del(val) {
this.$confirm("是否要删除记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: 2 }).then(res => {
if (res.code === 200) {
this.msgSuccess('删除成功!')
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
getReleaseWeight({ id: val.id }).then(res => {
if (res.code === 200) {
this.$confirm("是否要删除记录!", "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: 2 }).then(res => {
if (res.code === 200) {
this.msgSuccess(`删除成功!以释放舱位${res.data}`)
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
} else {
this.msgWarning(res.code)
}
}).catch(err => {
console.log(err)
})
},
//停用启用
changeStatus(val) {
...
...
@@ -161,22 +169,31 @@ export default {
status = 0
tip = '停用'
}
this.$confirm(`是否要${tip}记录!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
changeStatusById({ id: val.id, status: status }).then(res => {
if (tip === "停用") {
getReleaseWeight({ id: val.id }).then(res => {
if (res.code === 200) {
this.msgSuccess(tip + '成功!')
this.selection(1)
this.$confirm(`预计释放仓位为${res.data},是否确定!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
}).catch(() => { })
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
}).catch(() => { })
} else {
this.$confirm(`是否要${tip}记录!`, "注意!", {
confirmButtonText: "确定",
cancelButtonText: '取消',
type: "warning",
}).then(() => {
this.statusChange({ id: val.id, status: status, tip: tip })
}).catch(() => { })
}
},
//复制
copy(val) {
...
...
@@ -185,6 +202,23 @@ export default {
this.ruleData.id = undefined
this.dialogVisible = true
},
//状态修改请求
statusChange(val) {
changeStatusById(val).then(res => {
if (res.code === 200) {
if (val.tip == '停用') {
this.msgSuccess(`${val.tip}成功!以释放${res.data}`)
} else {
this.msgSuccess(`${val.tip}成功!`)
}
this.selection(1)
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
console.log(err)
})
},
//关闭
close() {
this.dialogVisible = false
...
...
Please
register
or
login
to post a comment