Merge branch 'dwb' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
@@ -112,6 +112,17 @@ export function posttbProskuCon(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 新增商品规格耗材信息-修改后
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function posttbProskuCons(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/tbProskuCon',
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 修改商品规格耗材信息状态
|
* 修改商品规格耗材信息状态
|
||||||
* @returns
|
* @returns
|
||||||
@@ -123,6 +134,14 @@ export function puttbProskuCon(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 编辑单位耗材值
|
||||||
|
// export function puttbProskuCon(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/api/tbProskuCon',
|
||||||
|
// method: "put",
|
||||||
|
// data
|
||||||
|
// });
|
||||||
|
// }
|
||||||
/**
|
/**
|
||||||
* 删除商品规格耗材信息状态
|
* 删除商品规格耗材信息状态
|
||||||
* @returns
|
* @returns
|
||||||
|
|||||||
@@ -13,6 +13,13 @@
|
|||||||
<span v-if="tableData.detail.subType==-1">-</span> {{ scope.row.number }} {{ scope.row.unitName }}
|
<span v-if="tableData.detail.subType==-1">-</span> {{ scope.row.number }} {{ scope.row.unitName }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="现有库存" prop="number">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ returnNowHasNumbr( scope.row)}}
|
||||||
|
|
||||||
|
<!-- {{ scope.row.stockNumber*1 + scope.row.number*1 }} {{ scope.row.unitName }} -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
@@ -43,6 +50,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//返回现有库存数量
|
||||||
|
returnNowHasNumbr(row){
|
||||||
|
return row.stockNumber*1 + row.number*1 +row.unitName
|
||||||
|
},
|
||||||
show(id) {
|
show(id) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.getTableData(id)
|
this.getTableData(id)
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
|
<el-button type="primary" icon="el-icon-plus"
|
||||||
|
@click="$refs.shopList.show(tableData.list)">选择商品规格</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
<el-table-column prop="id" label="ID" width="50px" />
|
<el-table-column prop="id" label="ID" width="50px" />
|
||||||
<el-table-column label="耗材信息ID" prop="conInfoId" />
|
<el-table-column label="耗材信息ID" prop="conInfoId" />
|
||||||
<el-table-column label="耗材信息名称" prop="conName" />
|
<el-table-column label="耗材信息名称" prop="conName" />
|
||||||
|
<!-- <el-table-column label="价格" prop="conName" /> -->
|
||||||
<el-table-column label="规格名称" prop="specSnap" />
|
<el-table-column label="规格名称" prop="specSnap" />
|
||||||
<el-table-column label="耗材信息代码" prop="conCode" />
|
<el-table-column label="耗材信息代码" prop="conCode" />
|
||||||
<el-table-column label="耗材信息单位" prop="conUnit" />
|
<el-table-column label="耗材信息单位" prop="conUnit" />
|
||||||
@@ -78,46 +80,55 @@
|
|||||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||||
layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" />
|
layout="total, sizes, prev, pager, next, jumper" @current-change="paginationChange" />
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
|
<el-dialog :title="dialogtitle" :visible.sync="dialogshow" width="50%">
|
||||||
<el-form ref="refruleForm" :model="ruleForm" :rules="rules" :inline="true">
|
<el-form ref="addSelect" :inline="true">
|
||||||
<el-form-item label="商品规格" prop="productSkuIdname">
|
<template v-if="addSelect.length">
|
||||||
<el-input v-model="ruleForm.productSkuIdname" placeholder="请输入商品规格" disabled></el-input>
|
<template v-if="addSelect[0].isDistribute == 1">
|
||||||
</el-form-item>
|
<el-form-item label="商品规格">
|
||||||
<el-form-item>
|
<el-input v-model="addSelect[0].specSnap" style="width: 130px;" placeholder="请选择商品规格"
|
||||||
<el-button type="primary" @click="tableDataskudialogshow = true">去选择商品规格</el-button>
|
disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="耗材信息" prop="conInfoIdname">
|
<el-form-item label="耗材信息" prop="conName">
|
||||||
<el-input v-model="ruleForm.conInfoIdname" placeholder="请输入耗材信息" disabled></el-input>
|
<el-input v-model="addSelect[0].conName" style="width: 130px;" placeholder="请选择耗材信息"
|
||||||
</el-form-item>
|
disabled></el-input>
|
||||||
<el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="informationdialogshow = true">去选择耗材信息</el-button>
|
<el-form-item>
|
||||||
</el-form-item>
|
<el-button type="primary" @click="informationdialogshow = true">去选择耗材信息</el-button>
|
||||||
<!-- <el-form-item label="是否禁用" prop="status">
|
</el-form-item>
|
||||||
<el-switch v-model="ruleForm.status" />
|
<el-form-item label="单位耗材值">
|
||||||
</el-form-item> -->
|
<el-input v-model="addSelect[0].surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||||
<el-form-item label="单位耗材值" prop="surplusStock">
|
</el-form-item>
|
||||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
</template>
|
||||||
</el-form-item>
|
<template v-else>
|
||||||
|
<template v-if="addSelect[0]">
|
||||||
|
<template v-for="(item, i) in addSelect[0].skuList">
|
||||||
|
<el-form-item label="商品规格">
|
||||||
|
<el-input v-model="item.specSnap" style="width: 130px;" placeholder="请选择商品规格"
|
||||||
|
disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="耗材信息" prop="conName">
|
||||||
|
<el-input v-model="item.conName" style="width: 130px;" placeholder="请选择耗材信息"
|
||||||
|
disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="selecthaocai(i)">去选择耗材信息</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位耗材值">
|
||||||
|
<el-input v-model="item.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||||
<el-button @click="dialogshow = false">取 消</el-button>
|
<el-button @click="dialogshow = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
<el-button type="primary" @click="submitForm('addSelect')">确 定</el-button>
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog title="修改" :visible.sync="dialogshows">
|
|
||||||
<el-form ref="refruleForm" :model="ruleForm" :inline="true" :rules="rulesdialogshows">
|
|
||||||
<el-form-item label="是否禁用" prop="status">
|
|
||||||
<el-switch v-model="ruleForm.status" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单位耗材值" prop="surplusStock">
|
|
||||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item style="display: flex;justify-content: flex-end;">
|
|
||||||
<el-button @click="dialogshows = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="submitForm('refruleForm')">确 定</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog title="耗材信息" :visible.sync="informationdialogshow">
|
<el-dialog title="耗材信息" :visible.sync="informationdialogshow">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-input v-model="queryinformation.conTypeId" size="small" clearable placeholder="请输入类型id"
|
<el-input v-model="queryinformation.conTypeId" size="small" clearable placeholder="请输入类型id"
|
||||||
@@ -155,45 +166,30 @@
|
|||||||
@current-change="paginationChangeinformation" />
|
@current-change="paginationChangeinformation" />
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="选择规格" :visible.sync="tableDataskudialogshow" width="700px;">
|
<el-dialog title="编辑" :visible.sync="informationdialogshowedit" width="20%">
|
||||||
<div class="head-container">
|
<el-form ref="addSelect" :inline="true">
|
||||||
<el-input v-model="querytableDatasku.specSnap" size="small" clearable placeholder="请输入规格"
|
<el-form-item label="单位耗材值">
|
||||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
<el-input v-model="surplusStocks.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||||
<el-input v-model="querytableDatasku.name" size="small" clearable placeholder="请输入商品名称"
|
</el-form-item>
|
||||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
<el-form-item style="display: flex;justify-content: flex-end;">
|
||||||
<el-input v-model="querytableDatasku.shopName" size="small" clearable placeholder="请输入店铺名称"
|
<el-button @click="informationdialogshowedit = false">取 消</el-button>
|
||||||
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatasku" />
|
<el-button type="primary" @click="submitForm('addSelect')">确 定</el-button>
|
||||||
<div style="display: flex; justify-content: flex-end;">
|
</el-form-item>
|
||||||
<el-button style="margin-right: 20px;" type="primary" @click="getTableDatasku">查询</el-button>
|
</el-form>
|
||||||
<el-button @click="resetHandlesku">重置</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-table ref="table" :data="tableDatasku.data" v-loading="tableDatasku.loading" row-key="id">
|
|
||||||
<el-table-column label="店铺名称" prop="shopName" />
|
|
||||||
<el-table-column label="商品名称" prop="name" />
|
|
||||||
<el-table-column label="规格" prop="specSnap" />
|
|
||||||
<el-table-column label="" width="200">
|
|
||||||
<template v-slot="scope">
|
|
||||||
<el-button @click="tableDatatablesku(scope.row)">确定</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="head-container">
|
|
||||||
<el-pagination :total="tableDatasku.total" :current-page="tableDatasku.page + 1"
|
|
||||||
:page-size="tableDatasku.size" layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@current-change="Changeinformationsku" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<shopList ref="shopList" @success="selectShop" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import settings from '@/settings'
|
import shopList from '../components/shopList'
|
||||||
import { upProSort } from '@/api/shop'
|
import { upProSort, tbProduct } from '@/api/shop'
|
||||||
import { getviewConSku, gettbProductSpec, gettbConsInfo, posttbProskuCon, puttbProskuCon, deletetbProskuCon } from '@/api/consumable'
|
import { getviewConSku, gettbProductSpec, gettbConsInfo, posttbProskuCons, puttbProskuCon, deletetbProskuCon } from '@/api/consumable'
|
||||||
export default {
|
export default {
|
||||||
|
components: { shopList },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dayjs,
|
dayjs,
|
||||||
@@ -203,7 +199,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
status: ''
|
status: ''
|
||||||
},
|
},
|
||||||
categorys: [],
|
surplusStocks: '',
|
||||||
typeEnums: [{
|
typeEnums: [{
|
||||||
label: '正常',
|
label: '正常',
|
||||||
value: '1'
|
value: '1'
|
||||||
@@ -212,9 +208,9 @@ export default {
|
|||||||
value: '0'
|
value: '0'
|
||||||
}],
|
}],
|
||||||
dialogshow: false, //弹框显示
|
dialogshow: false, //弹框显示
|
||||||
dialogshows: false,
|
|
||||||
dialogtitle: '', //文字显示
|
dialogtitle: '', //文字显示
|
||||||
informationdialogshow: false,
|
informationdialogshow: false,
|
||||||
|
informationdialogshowedit: false,
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
page: 0,
|
page: 0,
|
||||||
@@ -258,11 +254,11 @@ export default {
|
|||||||
status: false
|
status: false
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
conInfoIdname: [
|
conNameS: [
|
||||||
{ required: true, message: '请输入耗材信息', trigger: 'blur' }
|
{ required: true, message: '请输入耗材信息', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
productSkuIdname: [
|
name: [
|
||||||
{ required: true, message: '请输入商品规格', trigger: 'blur' }
|
{ required: true, message: '请选择商品规格', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
surplusStock: [
|
surplusStock: [
|
||||||
{ required: true, message: '请输入单位耗材值', trigger: 'blur' }
|
{ required: true, message: '请输入单位耗材值', trigger: 'blur' }
|
||||||
@@ -271,14 +267,10 @@ export default {
|
|||||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
{ required: true, message: '选择状态', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesdialogshows: {
|
// 动态新增选择框
|
||||||
surplusStock: [
|
addSelect: [],
|
||||||
{ required: true, message: '请输入单位耗材值', trigger: 'blur' }
|
// 选择耗材的index
|
||||||
],
|
ALLisDistribute: null
|
||||||
status: [
|
|
||||||
{ required: true, message: '选择状态', trigger: 'blur' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -290,6 +282,16 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
selectShop(res) {
|
||||||
|
this.addSelect = res
|
||||||
|
res[0]['specSnap'] = res[0].name
|
||||||
|
this.clickdialogframe('add')
|
||||||
|
},
|
||||||
|
// 选择耗材
|
||||||
|
selecthaocai(i) {
|
||||||
|
this.ALLisDistribute = i
|
||||||
|
this.informationdialogshow = true
|
||||||
|
},
|
||||||
//表格拖拽
|
//表格拖拽
|
||||||
tableDrag() {
|
tableDrag() {
|
||||||
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
|
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')
|
||||||
@@ -389,21 +391,30 @@ export default {
|
|||||||
},
|
},
|
||||||
// 耗材信息的信息
|
// 耗材信息的信息
|
||||||
tableDatainformationtable(item) {
|
tableDatainformationtable(item) {
|
||||||
this.ruleForm.conInfoId = item.id
|
this.addSelect.forEach((ele, i) => {
|
||||||
this.ruleForm.conInfoIdname = item.conName
|
ele.consInfoId = item.id
|
||||||
|
ele.conName = item.conName
|
||||||
|
if (this.ALLisDistribute != null) {
|
||||||
|
this.addSelect.forEach((ele, i) => {
|
||||||
|
ele.skuList[this.ALLisDistribute].skuId = item.id
|
||||||
|
ele.skuList[this.ALLisDistribute].conName = item.conName
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// this.ruleForm.skuInfos = item
|
||||||
|
// this.ruleForm.conInfoId = item.id
|
||||||
|
// this.ruleForm.conInfoIdname = item.conName
|
||||||
this.informationdialogshow = false
|
this.informationdialogshow = false
|
||||||
},
|
},
|
||||||
tableDatatablesku(item) {///规格
|
// tableDatatablesku(item) {///规格
|
||||||
console.log(item)
|
// this.ruleForm = item
|
||||||
this.ruleForm.productSkuId = item.id
|
// this.tableDataskudialogshow = false
|
||||||
this.ruleForm.productSkuIdname = item.name
|
// },
|
||||||
this.tableDataskudialogshow = false
|
|
||||||
},
|
|
||||||
// 获取商品规格
|
// 获取商品规格
|
||||||
async getTableDatasku() {
|
async getTableDatasku() {
|
||||||
this.tableDatasku.loading = true
|
this.tableDatasku.loading = true
|
||||||
try {
|
try {
|
||||||
const res = await gettbProductSpec({
|
const res = await tbProduct({
|
||||||
page: this.tableDatasku.page,
|
page: this.tableDatasku.page,
|
||||||
size: this.tableDatasku.size,
|
size: this.tableDatasku.size,
|
||||||
shopId: localStorage.getItem('shopId'),
|
shopId: localStorage.getItem('shopId'),
|
||||||
@@ -427,52 +438,73 @@ export default {
|
|||||||
if (type == 'add') { // 添加
|
if (type == 'add') { // 添加
|
||||||
this.dialogtitle = '添加'
|
this.dialogtitle = '添加'
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.refruleForm.resetFields()
|
this.$refs.addSelect.resetFields()
|
||||||
})
|
})
|
||||||
this.dialogshow = true
|
this.dialogshow = true
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.dialogshows = true
|
this.informationdialogshowedit = true
|
||||||
this.dialogtitle = '编辑'
|
this.dialogtitle = '编辑'
|
||||||
this.ruleForm.id = item.productSkuId
|
// console.log(item,'调试11')
|
||||||
this.ruleForm.conInfoId = item.conInfoId
|
this.surplusStocks = item
|
||||||
this.ruleForm.id = item.id
|
|
||||||
this.ruleForm.surplusStock = item.surplusStock
|
|
||||||
this.ruleForm.status = item.status == 0 ? true : false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitForm(formName) {
|
async submitForm(formName) {
|
||||||
this.$refs[formName].validate(async (valid) => {
|
if (this.dialogtitle == '编辑') {
|
||||||
if (valid) {
|
let { id, surplusStock } = this.surplusStocks
|
||||||
if (this.dialogtitle == '编辑') {
|
await puttbProskuCon({
|
||||||
await puttbProskuCon({
|
id,
|
||||||
id: this.ruleForm.id,
|
surplusStock
|
||||||
// productSkuId: this.ruleForm.productSkuId,
|
})
|
||||||
// conInfoId: this.ruleForm.conInfoId,
|
this.$message({
|
||||||
shopId: this.ruleForm.shopId,
|
message: '修改成功',
|
||||||
status: this.ruleForm.status ? '0' : '1',
|
type: 'success'
|
||||||
surplusStock: this.ruleForm.surplusStock
|
});
|
||||||
})
|
this.informationdialogshowedit = false
|
||||||
this.dialogshows = false
|
} else {
|
||||||
|
let { id, consInfoId, surplusStock } = this.addSelect[0]
|
||||||
this.getTableData()
|
let obj = {
|
||||||
} else {
|
productId: id,
|
||||||
await posttbProskuCon({
|
consInfoId: consInfoId,
|
||||||
productSkuId: this.ruleForm.productSkuId,
|
skuInfos: null,
|
||||||
conInfoId: this.ruleForm.conInfoId,
|
surplusStock: surplusStock
|
||||||
shopId: this.ruleForm.shopId,
|
|
||||||
status: this.ruleForm.status ? '0' : '1',
|
|
||||||
surplusStock: this.ruleForm.surplusStock
|
|
||||||
})
|
|
||||||
this.dialogshow = false
|
|
||||||
}
|
|
||||||
this.$refs[formName].resetFields()
|
|
||||||
this.getTableData()
|
|
||||||
} else {
|
|
||||||
console.log('error submit!!')
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
})
|
// 1为共享库存
|
||||||
|
if (this.addSelect[0].isDistribute != 1) {
|
||||||
|
let isgongx = false
|
||||||
|
this.addSelect[0].skuList.forEach(ele => {
|
||||||
|
if (!ele.skuId || !ele.surplusStock) {
|
||||||
|
isgongx = true
|
||||||
|
} else {
|
||||||
|
isgongx = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (isgongx) {
|
||||||
|
this.$message.error('请选择耗材信息与输入耗材值')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
obj.skuInfos = this.addSelect[0].skuList
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (!consInfoId) {
|
||||||
|
this.$message.error('请选择耗材信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!surplusStock) {
|
||||||
|
this.$message.error('请输入耗材值')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await posttbProskuCons(obj)
|
||||||
|
this.$message({
|
||||||
|
message: '新增成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
this.ALLisDistribute = null
|
||||||
|
this.dialogshow = false
|
||||||
|
}
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
this.getTableData()
|
||||||
|
|
||||||
},
|
},
|
||||||
resetForm(formName) {
|
resetForm(formName) {
|
||||||
this.$refs[formName].resetFields()
|
this.$refs[formName].resetFields()
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
<el-pagination @size-change="paginationSizeChange" :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<invoicingDetail ref="invoicingDetail" />
|
<invoicingDetail ref="invoicingDetail" />
|
||||||
@@ -149,7 +149,7 @@ export default {
|
|||||||
warnLine: null, // 警戒线
|
warnLine: null, // 警戒线
|
||||||
tableData: {
|
tableData: {
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 5,
|
size: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
sort: 'id',
|
sort: 'id',
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -297,8 +297,16 @@ export default {
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 每页条数改变是回调
|
||||||
|
paginationSizeChange(e){
|
||||||
|
console.log(e);
|
||||||
|
this.tableData.size = e
|
||||||
|
this.getTableData()
|
||||||
|
|
||||||
|
},
|
||||||
// 分页回调
|
// 分页回调
|
||||||
paginationChange(e) {
|
paginationChange(e) {
|
||||||
|
console.log(e)
|
||||||
this.tableData.page = e - 1
|
this.tableData.page = e - 1
|
||||||
this.tableData.list = []
|
this.tableData.list = []
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
{{ scope.row.paidAt && dayjs(scope.row.paidAt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ scope.row.paidAt && dayjs(scope.row.paidAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="80" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button type="text" size="mini" round @click="Uppop(scope.row.id)">付款</el-button>
|
<el-button type="text" size="mini" round @click="Uppop(scope.row.id)">付款</el-button>
|
||||||
<el-button type="text" size="mini"
|
<el-button type="text" size="mini"
|
||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
const res = await paidAmount({
|
const res = await paidAmount({
|
||||||
id: this.idinfo,
|
id: this.idinfo,
|
||||||
paidAmount: this.ruleForm.montey,
|
paidAmount: this.ruleForm.montey,
|
||||||
payType: this.payType,
|
payType: this.ruleForm.payType,
|
||||||
remark: this.ruleForm.remark
|
remark: this.ruleForm.remark
|
||||||
})
|
})
|
||||||
this.$message({ type: 'success', message: '付款成功!' });
|
this.$message({ type: 'success', message: '付款成功!' });
|
||||||
@@ -398,7 +398,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.typedialogshow = true
|
this.typedialogshow = true
|
||||||
this.tableDatatype.loading = false
|
this.tableDatatype.loading = false
|
||||||
this.tableDatatype.data = res.content
|
this.tableDatatype.data = res
|
||||||
this.tableDatatype.total = res.totalElements
|
this.tableDatatype.total = res.totalElements
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user