Commit f6d1c558 by wangyalan-git

操作日志,用户列表,管理员列表

parent 1f355521
...@@ -22,6 +22,16 @@ export function getOutboundRecordList(params) { ...@@ -22,6 +22,16 @@ export function getOutboundRecordList(params) {
params params
}) })
} }
// 万科后台_根据id修改一条出库数据
export function updateOutboundRecord(data) {
return request({
url: 'vankeOutboundRecord/updateById',
method: 'post',
data
})
}
// 万科后台_库房分页操作 // 万科后台_库房分页操作
...@@ -162,3 +172,19 @@ export function getInBoundList (params) { ...@@ -162,3 +172,19 @@ export function getInBoundList (params) {
params params
}) })
} }
// 万科后台_根据id修改订单数据
export function deleteInBoundList (data) {
return request({
url: 'vankeInboundOrder/updateById',
method: 'post',
data
})
}
// 万科后台_传入入库单详情集合(只需要传vorList即可)
export function updateInboundNum (data) {
return request({
url: 'vankeInboundOrder/updateInboundNum',
method: 'post',
data
})
}
...@@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth' ...@@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
const service = axios.create({ const service = axios.create({
// baseURL: process.env.BASE_API, // baseURL: process.env.BASE_API,
withCredentials: true, withCredentials: true,
baseURL: 'http://192.168.31.127:8201/mall-admin', baseURL: 'http://192.168.31.118:8201/mall-admin',
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin', // baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-admin',
timeout: 60000 // 请求超时时间 timeout: 60000 // 请求超时时间
}) })
......
...@@ -62,14 +62,26 @@ ...@@ -62,14 +62,26 @@
width="220" width="220"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" <div style="margin-bottom:10px;">
type="success" <el-button size="mini"
@click="handleView(scope.row)">查看详情 type="warning"
</el-button> @click="handleUpdate(scope.row)">修改
<el-button size="mini" </el-button>
type="primary" <el-button size="mini"
@click="exportEntry(scope.row)">生成入库单 type="success"
</el-button> @click="handleView(scope.row)">查看
</el-button>
</div>
<div>
<el-button size="mini"
type="danger"
@click="handleDelete(scope.row)">删除
</el-button>
<el-button size="mini"
type="primary"
@click="exportEntry(scope.row)">导出
</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -96,7 +108,7 @@ ...@@ -96,7 +108,7 @@
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import { getInBoundList } from '@/api/inventory' import { getInBoundList,deleteInBoundList,updateInboundNum } from '@/api/inventory'
import inventoryDetailsModal from './modules/inventoryDetailsModal' import inventoryDetailsModal from './modules/inventoryDetailsModal'
// 列表查询参数默认值 // 列表查询参数默认值
const defaultListQuery = { const defaultListQuery = {
...@@ -187,7 +199,24 @@ export default { ...@@ -187,7 +199,24 @@ export default {
}, },
// 查看 // 查看
handleView(row) { handleView(row) {
this.$refs.detail.init(row) this.$refs.detail.show(row)
},
// 修改/
handleUpdate(row){
this.$refs.detail.update(row)
},
// 删除
handleDelete(row){
this.$confirm('是否删除该入库信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInBoundList({id: row.id,deleteStatus: 0 }).then(res=>{
this.getList()
})
}).catch(() => {
});
}, },
// 导出 // 导出
exportEntry(row) { exportEntry(row) {
...@@ -199,7 +228,7 @@ export default { ...@@ -199,7 +228,7 @@ export default {
// 表头 // 表头
let tHeader = ['物品名称', '型号', '物品类别', '数量', '价格(元)', '供应商'] let tHeader = ['物品名称', '型号', '物品类别', '数量', '价格(元)', '供应商']
//表头对应字段名,要和下面数据key对应 //表头对应字段名,要和下面数据key对应
let filterVal = ['goodsName', 'goodsNo', 'categoryName', 'inboundNum', 'prict', 'supplierName'] let filterVal = ['goodsName', 'goodsNo', 'categoryName', 'inboundNum', 'price', 'supplierName']
let data = this.formatJson(filterVal, row.vorList) //数据格式化 let data = this.formatJson(filterVal, row.vorList) //数据格式化
exportJsonToExcel(tHeader, data, '入库单') //导出文件 exportJsonToExcel(tHeader, data, '入库单') //导出文件
}) })
......
...@@ -84,6 +84,10 @@ ...@@ -84,6 +84,10 @@
align="center"> align="center">
<template slot-scope="scope">{{scope.row.goodsNo}}</template> <template slot-scope="scope">{{scope.row.goodsNo}}</template>
</el-table-column> </el-table-column>
<el-table-column label="条形码"
align="center">
<template slot-scope="scope">{{scope.row.barCode}}</template>
</el-table-column>
<el-table-column label="物品类别" <el-table-column label="物品类别"
align="center"> align="center">
<template slot-scope="scope">{{scope.row.goodsCategoryName}}</template> <template slot-scope="scope">{{scope.row.goodsCategoryName}}</template>
...@@ -94,7 +98,7 @@ ...@@ -94,7 +98,7 @@
</el-table-column> </el-table-column>
<el-table-column label="价格" <el-table-column label="价格"
align="center"> align="center">
<template slot-scope="scope">{{scope.row.prict || 0}}</template> <template slot-scope="scope">{{scope.row.price || 0}}</template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" <el-table-column label="供应商"
align="center"> align="center">
......
...@@ -45,6 +45,17 @@ ...@@ -45,6 +45,17 @@
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="出库日期:" >
<el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changeDate">
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" <el-button type="primary"
@click="handleSearchList" @click="handleSearchList"
...@@ -101,6 +112,20 @@ ...@@ -101,6 +112,20 @@
align="center"> align="center">
<template slot-scope="scope">{{scope.row.createtime | formatTime }}</template> <template slot-scope="scope">{{scope.row.createtime | formatTime }}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作"
width="220"
align="center">
<template slot-scope="scope">
<el-button size="mini"
type="warning"
@click="handleUpdate(scope.row)">修改
</el-button>
<el-button size="mini"
type="danger"
@click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 分页栏 --> <!-- 分页栏 -->
...@@ -120,7 +145,7 @@ ...@@ -120,7 +145,7 @@
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
import { getOutboundRecordList, getGoodsCategoryList, getStockRooms, getDepartmentList } from '@/api/inventory' import { getOutboundRecordList, getGoodsCategoryList, getStockRooms, getDepartmentList,updateOutboundRecord } from '@/api/inventory'
// 列表查询参数默认值 // 列表查询参数默认值
const defaultListQuery = { const defaultListQuery = {
pageNum: 1, pageNum: 1,
...@@ -129,7 +154,9 @@ const defaultListQuery = { ...@@ -129,7 +154,9 @@ const defaultListQuery = {
stockRoomId: '', stockRoomId: '',
goodsMame: '', goodsMame: '',
memberName: '', memberName: '',
departId: '' departId: '',
startTime:'',
endTime:''
} }
export default { export default {
...@@ -137,6 +164,7 @@ export default { ...@@ -137,6 +164,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
dateRange: [],
listQuery: Object.assign({}, defaultListQuery), listQuery: Object.assign({}, defaultListQuery),
list: [], list: [],
total: 0, total: 0,
...@@ -162,6 +190,11 @@ export default { ...@@ -162,6 +190,11 @@ export default {
} }
}, },
methods: { methods: {
// 选择时间
changeDate(value){
this.listQuery.startTime = value[0]
this.listQuery.endTime = value[1]
},
handleResetSearch() { handleResetSearch() {
this.listQuery = Object.assign({}, defaultListQuery) this.listQuery = Object.assign({}, defaultListQuery)
this.getList() this.getList()
...@@ -214,7 +247,24 @@ export default { ...@@ -214,7 +247,24 @@ export default {
}).catch(err => { }).catch(err => {
this.listLoading = false this.listLoading = false
}) })
} },
// 修改/
handleUpdate(row){
this.$refs.detail.update(row)
},
// 删除
handleDelete(row){
this.$confirm('是否删除该条出库记录?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateOutboundRecord({id: row.id,deleteStatus: 0 }).then(res=>{
this.getList()
})
}).catch(() => {
});
},
} }
} }
</script> </script>
......
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
</el-table-column> </el-table-column>
<el-table-column label="价格(元)"> <el-table-column label="价格(元)">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item size="mini" :prop="'tableData.' + scope.$index + '.prict'" <el-form-item size="mini" :prop="'tableData.' + scope.$index + '.price'"
:rules="[{validator: validatePrice,trigger: 'blur'}]"> :rules="[{validator: validatePrice,trigger: 'blur'}]">
<el-input v-if="scope.row.isOK" v-model="scope.row.prict" class="input-width" <el-input v-if="scope.row.isOK" v-model="scope.row.price" class="input-width"
placeholder="价格" placeholder="价格"
:disabled="scope.row.id? true: false"></el-input> :disabled="scope.row.id? true: false"></el-input>
<span v-else>{{scope.row.prict}}</span> <span v-else>{{scope.row.price}}</span>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
name: '', name: '',
goodsNo: '', goodsNo: '',
goodsNum: '', goodsNum: '',
prict: '', price: '',
supplierId: '', supplierId: '',
goodsCategoryId: '', goodsCategoryId: '',
stockRoomId: this.$store.getters.stockRoomId, stockRoomId: this.$store.getters.stockRoomId,
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
this.formData.tableData[index].goodsNo = item.goodsNo this.formData.tableData[index].goodsNo = item.goodsNo
this.formData.tableData[index].barCode = item.barCode this.formData.tableData[index].barCode = item.barCode
this.formData.tableData[index].stockRoomId = item.stockRoomId this.formData.tableData[index].stockRoomId = item.stockRoomId
this.formData.tableData[index].prict = item.prict this.formData.tableData[index].price = item.price
this.formData.tableData[index].supplierId = item.supplierId this.formData.tableData[index].supplierId = item.supplierId
this.formData.tableData[index].supplierId = item.supplierId this.formData.tableData[index].supplierId = item.supplierId
this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId
......
...@@ -92,12 +92,12 @@ ...@@ -92,12 +92,12 @@
</el-table-column> </el-table-column>
<el-table-column label="价格(元)"> <el-table-column label="价格(元)">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item size="mini" :prop="'tableData.' + scope.$index + '.prict'" <el-form-item size="mini" :prop="'tableData.' + scope.$index + '.price'"
:rules="[{validator: validatePrice,trigger: 'blur'}]"> :rules="[{validator: validatePrice,trigger: 'blur'}]">
<el-input v-if="scope.row.isOK" v-model="scope.row.prict" class="input-width" <el-input v-if="scope.row.isOK" v-model="scope.row.price" class="input-width"
placeholder="价格" placeholder="价格"
:disabled="scope.row.id? true: false"></el-input> :disabled="scope.row.id? true: false"></el-input>
<span v-else>{{scope.row.prict}}</span> <span v-else>{{scope.row.price}}</span>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -395,7 +395,7 @@ export default { ...@@ -395,7 +395,7 @@ export default {
this.formData.tableData[index].goodsNo = item.goodsNo this.formData.tableData[index].goodsNo = item.goodsNo
this.formData.tableData[index].barCode = item.barCode this.formData.tableData[index].barCode = item.barCode
this.formData.tableData[index].stockRoomId = item.stockRoomId this.formData.tableData[index].stockRoomId = item.stockRoomId
this.formData.tableData[index].prict = item.prict this.formData.tableData[index].price = item.price
this.formData.tableData[index].supplierId = item.supplierId this.formData.tableData[index].supplierId = item.supplierId
this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId
}, },
...@@ -443,7 +443,7 @@ export default { ...@@ -443,7 +443,7 @@ export default {
rowTable.name = sheet['物品名称'] rowTable.name = sheet['物品名称']
rowTable.goodsNo = sheet['型号'] rowTable.goodsNo = sheet['型号']
rowTable.goodsNum = sheet['数量'] rowTable.goodsNum = sheet['数量']
rowTable.prict = sheet['价格'] rowTable.price = sheet['价格']
rowTable.barCode = sheet['条形码'] rowTable.barCode = sheet['条形码']
if (sheet['物品类别']) { if (sheet['物品类别']) {
let isExist = this.categoryOptions.findIndex(item => let isExist = this.categoryOptions.findIndex(item =>
...@@ -476,7 +476,7 @@ export default { ...@@ -476,7 +476,7 @@ export default {
isExist === -1 && (rowTable.id = null) isExist === -1 && (rowTable.id = null)
if( isExist !== -1){ if( isExist !== -1){
rowTable.id = this.goodsList[isExist].id rowTable.id = this.goodsList[isExist].id
rowTable.prict = this.goodsList[isExist].prict rowTable.price = this.goodsList[isExist].price
rowTable.goodsNo = this.goodsList[isExist].goodsNo rowTable.goodsNo = this.goodsList[isExist].goodsNo
rowTable.barCode = this.goodsList[isExist].barCode rowTable.barCode = this.goodsList[isExist].barCode
rowTable.goodsCategoryId = this.goodsList[isExist].goodsCategoryId rowTable.goodsCategoryId = this.goodsList[isExist].goodsCategoryId
......
<template> <template>
<el-dialog :visible.sync="visible" <el-dialog :visible.sync="visible"
title="物品详情" :title="title"
center center
@close="close"
width="720px"> width="720px">
<!-- start --> <!-- start -->
<div class="scroll-container" <div class="scroll-container no-bottom"
ref="scrollContainer"> ref="scrollContainer">
<el-table <el-form :model="formData" ref="formData">
:data="tableData" <el-table
style="width: 100%"> :data="formData.tableData"
<el-table-column style="width: 100%"
prop="goodsName" class="my_table">
label="物品名称"> <el-table-column
</el-table-column> prop="goodsName"
<el-table-column label="物品名称">
prop="goodsNo" </el-table-column>
label="型号"> <el-table-column
</el-table-column> prop="goodsNo"
<el-table-column label="型号">
prop="categoryName" </el-table-column>
label="物品类别"> <el-table-column
</el-table-column> prop="categoryName"
<el-table-column label="物品类别">
prop="inboundNum" </el-table-column>
label="数量"> <el-table-column
</el-table-column> prop="inboundNum"
<el-table-column label="数量">
prop="prict" <template slot-scope="scope">
label="价格(元)"> <el-form-item size="mini" :prop="'tableData.' + scope.$index + '.inboundNum'"
</el-table-column> :rules="[{validator: validateNum,trigger: 'blur'}]">
<el-table-column <el-input v-if="isEdit" v-model="scope.row.inboundNum" class="input-width"
prop="supplierName" placeholder="数量"></el-input>
label="供应商"> <span v-else>{{scope.row.inboundNum}}</span>
</el-table-column> </el-form-item>
</el-table> </template>
</el-table-column>
<el-table-column
prop="price"
label="价格(元)">
</el-table-column>
<el-table-column
prop="supplierName"
label="供应商">
</el-table-column>
</el-table>
</el-form>
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button type="primary" <el-button type="primary"
v-if="isEdit"
@click="submit('formData')">提交
</el-button>
<el-button type=""
@click="close">返回 @click="close">返回
</el-button> </el-button>
</div> </div>
...@@ -46,27 +62,86 @@ ...@@ -46,27 +62,86 @@
<script> <script>
// 添加编辑属性 // 添加编辑属性
import {updateInboundNum} from '@/api/inventory'
export default { export default {
name: 'inventoryDetailsModal', name: 'inventoryDetailsModal',
data() { data() {
var validateNum = (rule, value, callback) => {
if (value === '') {
callback(new Error('数量不能为空'))
} else {
let myReg = /^\d{1,}$/
if (!myReg.test(value)) {
callback(new Error('数量必须为正整数'))
}
callback()
}
}
return { return {
validateNum: validateNum,
visible: false, visible: false,
title: null, title: null,
loading: false, loading: false,
tableData: [] formData: {
tableData: [],
},
isEdit: false
} }
}, },
methods: { methods: {
init(row) { init() {
this.visible = true this.visible = true
this.tableData = row.vorList this.formData.tableData = []
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.formData.clearValidate()
this.$refs.scrollContainer.scrollTop = 0 this.$refs.scrollContainer.scrollTop = 0
}) })
}, },
show(row){
this.init()
this.title = '查看物品详情'
this.isEdit = false
this.formData.tableData = row.vorList
console.log(' this.formData.tableData', this.formData.tableData)
},
update(row){
this.init()
this.title = '修改物品详情'
this.isEdit = true
this.formData.tableData = row.vorList
},
close() { close() {
if(this.isEdit){
this.$emit('ok')
}
this.visible = false this.visible = false
} },
submit(formName) {
if(!this.formData.tableData.length){
this.$message.warning('请检查必填项')
return
}
this.$refs[formName].validate((valid) => {
if (valid) {
let data = []
this.formData.tableData.forEach(item=>{
data.push({
id: item.id,
inboundNum: item.inboundNum
})
})
updateInboundNum({ vorList: data }).then(res => {
this.$emit('ok')
this.visible = false
})
} else {
this.$message.warning('请检查必填项')
}
})
},
} }
} }
</script> </script>
...@@ -77,3 +152,17 @@ export default { ...@@ -77,3 +152,17 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
</style> </style>
<style>
.no-bottom .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
margin-bottom: 0;
}
.no-bottom .el-form-item__error {
position: relative;
top: 0;
margin: 5px 0;
}
.no-bottom .el-table th, .el-table td {
vertical-align: top;
}
</style>
...@@ -103,12 +103,12 @@ ...@@ -103,12 +103,12 @@
</el-table-column> </el-table-column>
<el-table-column label="价格(元)"> <el-table-column label="价格(元)">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item size="mini" :prop="'tableData.' + scope.$index + '.prict'" <el-form-item size="mini" :prop="'tableData.' + scope.$index + '.price'"
:rules="[{validator: validatePrice,trigger: 'blur'}]"> :rules="[{validator: validatePrice,trigger: 'blur'}]">
<el-input v-if="scope.row.isOK" v-model="scope.row.prict" class="input-width" <el-input v-if="scope.row.isOK" v-model="scope.row.price" class="input-width"
placeholder="价格" placeholder="价格"
:disabled="scope.row.id? true: false"></el-input> :disabled="scope.row.id? true: false"></el-input>
<span v-else>{{scope.row.prict}}</span> <span v-else>{{scope.row.price}}</span>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
// name: '', // name: '',
// goodsNo: '', // goodsNo: '',
// goodsNum: '', // goodsNum: '',
// prict: '', // price: '',
// supplierId: '', // supplierId: '',
// goodsCategoryId: '', // goodsCategoryId: '',
// stockRoomId: this.$store.getters.stockRoomId, // stockRoomId: this.$store.getters.stockRoomId,
...@@ -370,7 +370,7 @@ export default { ...@@ -370,7 +370,7 @@ export default {
this.formData.tableData[index].goodsNo = item.goodsNo this.formData.tableData[index].goodsNo = item.goodsNo
this.formData.tableData[index].barCode = item.barCode this.formData.tableData[index].barCode = item.barCode
this.formData.tableData[index].stockRoomId = item.stockRoomId this.formData.tableData[index].stockRoomId = item.stockRoomId
this.formData.tableData[index].prict = item.prict this.formData.tableData[index].price = item.price
this.formData.tableData[index].supplierId = item.supplierId this.formData.tableData[index].supplierId = item.supplierId
this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId
console.log('item', item) console.log('item', item)
...@@ -404,7 +404,7 @@ export default { ...@@ -404,7 +404,7 @@ export default {
barCode: data.barCode, barCode: data.barCode,
name: data.name, name: data.name,
stockRoomId: data.stockRoomId, stockRoomId: data.stockRoomId,
prict: data.prict, price: data.price,
goodsNo: data.goodsNo, goodsNo: data.goodsNo,
supplierId: data.supplierId, supplierId: data.supplierId,
goodsCategoryId: data.goodsCategoryId, goodsCategoryId: data.goodsCategoryId,
......
...@@ -90,12 +90,12 @@ ...@@ -90,12 +90,12 @@
</el-table-column> </el-table-column>
<el-table-column label="价格(元)"> <el-table-column label="价格(元)">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item size="mini" :prop="'tableData.' + scope.$index + '.prict'" <el-form-item size="mini" :prop="'tableData.' + scope.$index + '.price'"
:rules="[{validator: validatePrice,trigger: 'blur'}]"> :rules="[{validator: validatePrice,trigger: 'blur'}]">
<el-input v-if="scope.row.isOK" v-model="scope.row.prict" class="input-width" <el-input v-if="scope.row.isOK" v-model="scope.row.price" class="input-width"
placeholder="价格" placeholder="价格"
:disabled="scope.row.id? true: false"></el-input> :disabled="scope.row.id? true: false"></el-input>
<span v-else>{{scope.row.prict}}</span> <span v-else>{{scope.row.price}}</span>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -267,7 +267,7 @@ export default { ...@@ -267,7 +267,7 @@ export default {
// name: '', // name: '',
// goodsNo: '', // goodsNo: '',
// goodsNum: '', // goodsNum: '',
// prict: '', // price: '',
// supplierId: '', // supplierId: '',
// goodsCategoryId: '', // goodsCategoryId: '',
// stockRoomId: this.$store.getters.stockRoomId, // stockRoomId: this.$store.getters.stockRoomId,
...@@ -339,7 +339,7 @@ export default { ...@@ -339,7 +339,7 @@ export default {
this.formData.tableData[index].goodsNo = item.goodsNo this.formData.tableData[index].goodsNo = item.goodsNo
this.formData.tableData[index].barCode = item.barCode this.formData.tableData[index].barCode = item.barCode
this.formData.tableData[index].stockRoomId = item.stockRoomId this.formData.tableData[index].stockRoomId = item.stockRoomId
this.formData.tableData[index].prict = item.prict this.formData.tableData[index].price = item.price
this.formData.tableData[index].supplierId = item.supplierId this.formData.tableData[index].supplierId = item.supplierId
this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId this.formData.tableData[index].goodsCategoryId = item.goodsCategoryId
console.log('item', item) console.log('item', item)
...@@ -358,7 +358,7 @@ export default { ...@@ -358,7 +358,7 @@ export default {
goodsNo: data ? data.goodsNo : null, goodsNo: data ? data.goodsNo : null,
barCode: data ? data.barCode : this.barCode, barCode: data ? data.barCode : this.barCode,
stockRoomId: data ? data.stockRoomId : stockRoomId, stockRoomId: data ? data.stockRoomId : stockRoomId,
prict: data ? data.prict : null, price: data ? data.price : null,
supplierId: data ? data.supplierId : null, supplierId: data ? data.supplierId : null,
goodsCategoryId: data ? data.goodsCategoryId : null, goodsCategoryId: data ? data.goodsCategoryId : null,
name: data ? data.name : null, name: data ? data.name : null,
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" <el-button size="mini"
type="success" type="success"
@click="handleDelete(scope.row.id)">解绑 @click="handleDelete(scope.row)">解绑
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -160,13 +160,13 @@ export default { ...@@ -160,13 +160,13 @@ export default {
}) })
}, },
// 删除 // 删除
handleDelete(id) { handleDelete(row) {
this.$confirm('是否取消管理员权限?', '提示', { this.$confirm('是否取消管理员权限?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
cancleAdmin({ id: id, deleteStatus: 1 }).then(res => { cancleAdmin({ id: row.adminId,memberId: row.id, deleteStatus: 1 }).then(res => {
this.getList() this.getList()
}) })
}).catch(() => { }).catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment