Merge branch 'wwz' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into test
This commit is contained in:
commit
585c26fd4d
|
|
@ -39,13 +39,8 @@ export function puttbConsType(data) {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function gettbConsInfo(data) {
|
export function gettbConsInfo(data) {
|
||||||
// return request({
|
|
||||||
// url: '/api/tbConsInfo',
|
|
||||||
// method: "get",
|
|
||||||
// params
|
|
||||||
// });
|
|
||||||
return request({
|
return request({
|
||||||
url: "/api/viewConInfoFlow/get",
|
url: "/api/tbConsInfo/allAndPro",
|
||||||
method: "post",
|
method: "post",
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
/> -->
|
/> -->
|
||||||
<div style="width: 150px">
|
<div style="width: 150px">
|
||||||
<el-select v-model="query.conTypeId" placeholder="请选择耗材分类" style="width: 100%">
|
<el-select v-model="query.conTypeId" placeholder="请选择耗材分类" style="width: 100%">
|
||||||
<el-option :label="item.conTypeName" :value="item.id" v-for="item in consTypeList"
|
<el-option :label="item.conTypeName" :value="item.id" v-for="item in tableDatatype.data"
|
||||||
:key="item.conTypeId" />
|
:key="item.conTypeId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -30,15 +30,10 @@
|
||||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|
||||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<el-button icon="el-icon-download" :loading="downloadLoading" @click="protHandle">导出耗材</el-button>
|
|
||||||
<el-button icon="el-icon-upload2" :loading="uploadLoading" @click="dialogVisible = true">导入耗材</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row_wrap" style="margin-top: 12px">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||||
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
|
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
|
||||||
|
|
@ -46,6 +41,18 @@
|
||||||
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
|
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
|
||||||
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
|
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
|
||||||
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
|
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
|
||||||
|
<el-button icon="el-icon-download" :loading="downloadLoading" @click="protHandle">导出耗材</el-button>
|
||||||
|
<el-button icon="el-icon-upload2" :loading="uploadLoading" @click="dialogVisible = true">导入耗材</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row_wrap" style="margin-top: 12px">
|
||||||
|
<div class="row">
|
||||||
|
<!-- <el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
||||||
|
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
|
||||||
|
<el-button @click="$router.push({ name: 'operation_out' })">出库</el-button>
|
||||||
|
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
|
||||||
|
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
|
||||||
|
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
|
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
|
||||||
|
|
@ -242,20 +249,15 @@
|
||||||
<el-table-column label="耗材消耗" prop="conConsume" />
|
<el-table-column label="耗材消耗" prop="conConsume" />
|
||||||
<el-table-column label="耗材入库" prop="conIn" />
|
<el-table-column label="耗材入库" prop="conIn" />
|
||||||
<el-table-column label="耗材出库" prop="conOut" />
|
<el-table-column label="耗材出库" prop="conOut" />
|
||||||
<el-table-column label="耗材反还" prop="conReturn" />
|
<el-table-column label="耗材反还" prop="conReturn" />-->
|
||||||
<el-table-column label="库存开关" prop="conReturn">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
|
||||||
@change="showChange($event, scope.row)"></el-switch>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="所属商品">
|
<el-table-column label="所属商品">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="goodslang">
|
<div class="goodslang">
|
||||||
<div class="goods-list">
|
<div class="goods-list">
|
||||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.productId)" :key="item.productId"
|
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.id)" :key="item.productId"
|
||||||
type="text">{{
|
type="text">{{
|
||||||
item.productName }}</el-button>
|
item.name }}</el-button><span v-if="scope.row.product.length > 1">,</span>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown trigger="click" v-if="scope.row.product.length > 1" @command="toGoods">
|
<el-dropdown trigger="click" v-if="scope.row.product.length > 1" @command="toGoods">
|
||||||
<span class="el-dropdown-link" style="color: blue;">
|
<span class="el-dropdown-link" style="color: blue;">
|
||||||
|
|
@ -264,7 +266,7 @@
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item class="clearfix" v-for="(item) in scope.row.product" :key="item.productId"
|
<el-dropdown-item class="clearfix" v-for="(item) in scope.row.product" :key="item.productId"
|
||||||
:command="item.productId">
|
:command="item.productId">
|
||||||
{{ item.productName }}
|
{{ item.name }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
@ -273,8 +275,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" prop="stockNumber">
|
<el-table-column label="库存数量" prop="stockNumber">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ (scope.row.balance).toFixed(2) }}
|
{{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
|
||||||
<!-- {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }} -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="预警值" prop="conWarning">
|
<el-table-column label="预警值" prop="conWarning">
|
||||||
|
|
@ -290,15 +291,20 @@
|
||||||
{{ scope.row.conWarning }}
|
{{ scope.row.conWarning }}
|
||||||
</span>
|
</span>
|
||||||
<i class="el-icon-edit" @click="editorHandle(scope.row)"></i>
|
<i class="el-icon-edit" @click="editorHandle(scope.row)"></i>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="status">
|
<el-table-column label="库存开关" prop="conReturn">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
||||||
|
@change="showChange($event, scope.row)"></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="状态" prop="status">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0"
|
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0"
|
||||||
@change="changeswitchstatus(scope.row)"></el-switch>
|
@change="changeswitchstatus(scope.row)"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<!-- <el-table-column label="创建时间" prop="createTime" width="200"> </el-table-column> -->
|
<!-- <el-table-column label="创建时间" prop="createTime" width="200"> </el-table-column> -->
|
||||||
<el-table-column label="操作" width="250" fixed="right">
|
<el-table-column label="操作" width="250" fixed="right">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
|
@ -355,7 +361,7 @@
|
||||||
<el-form-item label="耗材类型" prop="conTypeId">
|
<el-form-item label="耗材类型" prop="conTypeId">
|
||||||
<el-select v-model="item.conTypeId" placeholder="请选择"
|
<el-select v-model="item.conTypeId" placeholder="请选择"
|
||||||
@change="selectChange($event, 'refruleForm' + index, 'conTypeId')">
|
@change="selectChange($event, 'refruleForm' + index, 'conTypeId')">
|
||||||
<el-option v-for="option in consTypeList" :key="option.conTypeId" :label="option.conTypeName"
|
<el-option v-for="option in tableDatatype.data" :key="option.conTypeId" :label="option.conTypeName"
|
||||||
:value="option.id">
|
:value="option.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -418,7 +424,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
||||||
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
||||||
<el-option v-for="item in consTypeList" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
<el-option v-for="item in tableDatatype.data" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
|
@ -456,9 +462,9 @@
|
||||||
<el-form-item label="预警值">
|
<el-form-item label="预警值">
|
||||||
<el-input v-model="ruleForm.conWarning" placeholder="请输入耗材预警值"></el-input>
|
<el-input v-model="ruleForm.conWarning" placeholder="请输入耗材预警值"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" v-if="dialogtitle == '编辑'">
|
<!-- <el-form-item label="状态" v-if="dialogtitle == '编辑'">
|
||||||
<el-switch v-model="ruleForm.status" active-value="1" inactive-value="0"></el-switch>
|
<el-switch v-model="ruleForm.status" active-value="1" inactive-value="0"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<!-- <el-form-item label="单位耗材值" prop="surplusStock">
|
<!-- <el-form-item label="单位耗材值" prop="surplusStock">
|
||||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
|
@ -593,7 +599,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
tongji: {},//统计
|
tongji: {},//统计
|
||||||
dayjs,
|
dayjs,
|
||||||
consTypeList: [],
|
|
||||||
query: {
|
query: {
|
||||||
conTypeId: "",
|
conTypeId: "",
|
||||||
conTypeName: "",
|
conTypeName: "",
|
||||||
|
|
@ -643,7 +648,7 @@ export default {
|
||||||
tableDatatype: {
|
tableDatatype: {
|
||||||
data: [],
|
data: [],
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 30,
|
size:100,
|
||||||
loading: false,
|
loading: false,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
|
|
@ -716,7 +721,6 @@ export default {
|
||||||
this.resetRuleForms()
|
this.resetRuleForms()
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
this.getTableDatatype();
|
this.getTableDatatype();
|
||||||
this.gettbConsType()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lookDetail(row) {
|
lookDetail(row) {
|
||||||
|
|
@ -870,25 +874,27 @@ export default {
|
||||||
createTime: arr
|
createTime: arr
|
||||||
});
|
});
|
||||||
this.tableData.loading = false;
|
this.tableData.loading = false;
|
||||||
// this.tableData.data = res.content;
|
|
||||||
this.tableData.total = res.totalElements;
|
this.tableData.total = res.totalElements;
|
||||||
|
this.tableData.data = res.content;
|
||||||
this.gettbConsInfoFlowcount()//统计
|
this.gettbConsInfoFlowcount()//统计
|
||||||
this.tableData.data = res.content.map(v => {
|
console.log(this.tableData.data)
|
||||||
const productIds = v.productId ? v.productId.split(',') : []
|
// this.tableData.data = res.content.map(v => {
|
||||||
return {
|
// const productIds = v.productId ? v.productId.split(',') : []
|
||||||
...v,
|
// return {
|
||||||
editNYD: 0,
|
// ...v,
|
||||||
product: productIds.map((str, index) => {
|
// editNYD: 0,
|
||||||
const startIndex = str.indexOf('_')
|
// product: productIds.map((str, index) => {
|
||||||
const productId = str.slice(0, startIndex)
|
// const startIndex = str.indexOf('_')
|
||||||
const productName = str.slice(startIndex + 1, str.length)
|
// const productId = str.slice(0, startIndex)
|
||||||
return {
|
// const productName = str.slice(startIndex + 1, str.length)
|
||||||
productId,
|
// return {
|
||||||
productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
|
// productId,
|
||||||
}
|
// productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
|
||||||
})
|
// }
|
||||||
}
|
// })
|
||||||
});
|
// }
|
||||||
|
// });
|
||||||
|
console.log(this.tableData.data)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -963,7 +969,7 @@ export default {
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
productId: '',//预留耗材id
|
productId: '',//预留耗材id
|
||||||
column: this.stockData.column,//列名
|
column: this.stockData.column,//列名
|
||||||
conName:this.query.conName,
|
conName: this.query.conName,
|
||||||
createdAt: arr//耗材id
|
createdAt: arr//耗材id
|
||||||
})
|
})
|
||||||
this.stockData.loading = false;
|
this.stockData.loading = false;
|
||||||
|
|
@ -976,19 +982,6 @@ export default {
|
||||||
this.gettbConsInfoFlowstock();
|
this.gettbConsInfoFlowstock();
|
||||||
},
|
},
|
||||||
// 获取类型
|
// 获取类型
|
||||||
async gettbConsType() {
|
|
||||||
try {
|
|
||||||
const res = await gettbConsType({
|
|
||||||
page: 0,
|
|
||||||
size: 100,
|
|
||||||
shopId: localStorage.getItem("shopId")
|
|
||||||
})
|
|
||||||
this.consTypeList = res.content
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取类型
|
|
||||||
async getTableDatatype() {
|
async getTableDatatype() {
|
||||||
this.tableDatatype.loading = true;
|
this.tableDatatype.loading = true;
|
||||||
try {
|
try {
|
||||||
|
|
@ -1047,7 +1040,7 @@ export default {
|
||||||
if (type == "add") {
|
if (type == "add") {
|
||||||
// 添加
|
// 添加
|
||||||
this.dialogtitle = "添加";
|
this.dialogtitle = "添加";
|
||||||
this.gettbConsType()
|
this.getTableDatatype()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.refruleForm.resetFields();
|
this.$refs.refruleForm.resetFields();
|
||||||
this.resetRuleForms()
|
this.resetRuleForms()
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-select v-model="scope.row.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
<el-select v-model="scope.row.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
||||||
:remote-method="remoteMethod" :loading="loading" @change="selectionChange($event, scope.row)">
|
:remote-method="remoteMethod" :loading="loading" @change="selectionChange($event, scope.row)">
|
||||||
<el-option v-for="item in options" :key="item.consId" :label="item.conName"
|
<el-option v-for="item in options" :key="item.id" :label="item.conName"
|
||||||
:value="item.consId">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
||||||
|
|
@ -65,8 +65,8 @@
|
||||||
<el-select v-model="item.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
<el-select v-model="item.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
||||||
:remote-method="remoteMethod" :loading="loading"
|
:remote-method="remoteMethod" :loading="loading"
|
||||||
@change="skuSelectionChange($event, item)">
|
@change="skuSelectionChange($event, item)">
|
||||||
<el-option v-for="item in options" :key="item.consId" :label="item.conName"
|
<el-option v-for="item in options" :key="item.id" :label="item.conName"
|
||||||
:value="item.consId">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
||||||
|
|
@ -188,13 +188,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 商品选择耗材
|
// 商品选择耗材
|
||||||
selectionChange(e, row) {
|
selectionChange(e, row) {
|
||||||
let item = this.options.find(item => item.consId == e)
|
let item = this.options.find(item => item.id == e)
|
||||||
row.name = item.conName
|
row.name = item.conName
|
||||||
row.conUnit = item.conUnit
|
row.conUnit = item.conUnit
|
||||||
},
|
},
|
||||||
// 规格选择耗材
|
// 规格选择耗材
|
||||||
skuSelectionChange(e, row) {
|
skuSelectionChange(e, row) {
|
||||||
let item = this.options.find(item => item.consId == e)
|
let item = this.options.find(item => item.id == e)
|
||||||
row.name = item.conName
|
row.name = item.conName
|
||||||
row.conUnit = item.conUnit
|
row.conUnit = item.conUnit
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span>增加数量</span>
|
<span>增加数量:</span>
|
||||||
<span class="link" @click="showStockHistory('addCountNumber')">{{ countInfo.addCountNumber || 0 }}</span>
|
<span class="link" @click="showStockHistory('addCountNumber')">{{ countInfo.addCountNumber || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span>手动增加:</span>
|
<span>手动增加:</span>
|
||||||
<span class="link" @click="showStockHistory('addNumber')">{{ countInfo.addNumber || 0 }}</span>
|
<span class="link" @click="showStockHistory('addNumber')">{{ countInfo.addNumber || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
@ -71,12 +71,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span>减少数量</span>
|
<span>减少数量:</span>
|
||||||
<span class="link" @click="showStockHistory('subCountNumber')">{{ countInfo.subCountNumber || 0 }}</span>
|
<span class="link" @click="showStockHistory('subCountNumber')">{{ countInfo.subCountNumber || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span>手动减少:</span>
|
<span>手动减少:</span>
|
||||||
<span class="link" @click="showStockHistory('subNumber')">{{ countInfo.subNumber || 0 }}</span>
|
<span class="link" @click="showStockHistory('subNumber')">{{ countInfo.subNumber || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue