|
@@ -160,12 +160,16 @@
|
|
|
}}</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="操作" min-width="160">
|
|
|
+ <el-table-column align="center" label="操作" min-width="230">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="setForcedHold(scope.row)"
|
|
|
+ >设置强制仓</el-button>
|
|
|
<template v-if="checkBtnRole('status')">
|
|
|
<el-popconfirm
|
|
|
v-if="scope.row.status"
|
|
|
- style="margin-right: 10px"
|
|
|
+ style="margin: 0px 10px"
|
|
|
title="确定冻结吗?"
|
|
|
@confirm="changeStatus(scope.row.adminUserId, 0)"
|
|
|
>
|
|
@@ -173,7 +177,7 @@
|
|
|
</el-popconfirm>
|
|
|
<el-popconfirm
|
|
|
v-else
|
|
|
- style="margin-right: 10px"
|
|
|
+ style="margin: 0px 10px"
|
|
|
title="确定恢复吗?"
|
|
|
@confirm="changeStatus(scope.row.adminUserId, 1)"
|
|
|
>
|
|
@@ -404,6 +408,32 @@
|
|
|
<el-button type="primary" @click="submitResetForm">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 设置强制仓 -->
|
|
|
+ <el-dialog
|
|
|
+ title="设置强制仓"
|
|
|
+ :visible.sync="resetForcedHold"
|
|
|
+ :show-close="false"
|
|
|
+ width="800px"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-form ref="resetForm" label-position="left" label-width="100px" size="mini">
|
|
|
+ <template v-for="(item,index) in resetForcedHoldList">
|
|
|
+ <div :key="index">
|
|
|
+ <el-form-item label="" prop="newPassword" label-width="0px" style="margin: 0 !important;">
|
|
|
+ <div>{{item.name}}</div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="强制品类" prop="confirmPassword">
|
|
|
+ <el-checkbox v-for="(val,i) in item.kingDeeCategories" :key="i" v-model="val.isChecked">{{val.name}}</el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="resetForcedHold=false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="subForcedHold">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -419,11 +449,13 @@ import {
|
|
|
getRoleList,
|
|
|
getMerchantList,
|
|
|
changeAccountStatus,
|
|
|
- resetPassword
|
|
|
+ resetPassword,
|
|
|
+ stockForceUserList,
|
|
|
+ stockForceUserAdd
|
|
|
} from '@/api/setting'
|
|
|
import { getDealerList, getCategoryList } from '@/api/common'
|
|
|
import { findElem, downloadFiles, handleImportTwo } from '@/utils/util'
|
|
|
-
|
|
|
+// /stock/forceUser/list
|
|
|
export default {
|
|
|
data() {
|
|
|
var validatePass = (rule, value, callback) => {
|
|
@@ -557,7 +589,9 @@ export default {
|
|
|
groupList: [],
|
|
|
myID: '',
|
|
|
passwordType1: 'password',
|
|
|
- passwordType2: 'password'
|
|
|
+ passwordType2: 'password',
|
|
|
+ resetForcedHold:false,
|
|
|
+ resetForcedHoldList:[]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -587,6 +621,38 @@ export default {
|
|
|
await this.getRoleList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ subForcedHold(){
|
|
|
+ var pams = []
|
|
|
+ this.resetForcedHoldList.map(item=>{
|
|
|
+ item.kingDeeCategories.filter(val=>val.isChecked).map(data=>{
|
|
|
+ pams.push({
|
|
|
+ categoryId:data.id,
|
|
|
+ correspondId:item.id,
|
|
|
+ correspondName:item.name,
|
|
|
+ adminUserId:this.adminUserId_jl
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.adminUserId_jl = null
|
|
|
+ stockForceUserAdd({
|
|
|
+ adminUserForceStocks:pams
|
|
|
+ }).then(res=>{
|
|
|
+ this.resetForcedHold = false
|
|
|
+ console.log(res)
|
|
|
+ this.$successMsg('设置成功')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getForcedHoldList(){
|
|
|
+ this.resetForcedHoldList = []
|
|
|
+ stockForceUserList().then(res=>{
|
|
|
+ this.resetForcedHoldList = res.data
|
|
|
+ this.resetForcedHold = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setForcedHold(row){
|
|
|
+ this.adminUserId_jl=row.adminUserId
|
|
|
+ this.getForcedHoldList()
|
|
|
+ },
|
|
|
// 获取仓库仓位对应关系列表
|
|
|
async getStockList() {
|
|
|
const res = await getStockListStock({ pageSize: -1, pageNum: 1 })
|