Merge branch 'dev' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into ymf
This commit is contained in:
commit
3ae0d7991b
|
|
@ -1,67 +1,32 @@
|
|||
<!-- 新增耗材盘点 -->
|
||||
<template>
|
||||
<el-dialog
|
||||
title="耗材盘点"
|
||||
:visible.sync="dialogVisible"
|
||||
width="80%"
|
||||
@open="form.note = ''"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-position="left"
|
||||
inline
|
||||
>
|
||||
<el-dialog title="耗材盘点" :visible.sync="dialogVisible" width="80%" @open="form.note = ''">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline>
|
||||
<el-form-item label="账存数量">
|
||||
<el-input :value="detail.num" readonly style="width: 180px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际数量">
|
||||
<el-input-number
|
||||
v-model="form.lpNum"
|
||||
:min="0"
|
||||
:step="1"
|
||||
step-strictly
|
||||
style="width: 180px;"
|
||||
></el-input-number>
|
||||
<el-input-number v-model="form.lpNum" :min="0" :step="1" step-strictly style="width: 180px;"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="盈亏数量">
|
||||
<el-input
|
||||
:value="profitNumber"
|
||||
readonly
|
||||
:class="{ lose: profitNumber < 0 }"
|
||||
style="width: 180px;"
|
||||
></el-input>
|
||||
<el-input :value="profitNumber" readonly :class="{ lose: profitNumber < 0 }" style="width: 180px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单价">
|
||||
<el-input v-model="detail.price" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="盈亏金额">
|
||||
<el-input
|
||||
:value="profitPrice"
|
||||
readonly
|
||||
:class="{ lose: profitNumber < 0 }"
|
||||
style="width: 180px;"
|
||||
></el-input>
|
||||
<el-input :value="profitPrice" readonly :class="{ lose: profitNumber < 0 }" style="width: 180px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" style="width: 180px;"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="备注">
|
||||
<el-input v-model="form.note" placeholder="请输入备注" style="width: 300px;"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="onSubmitHandle"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="dialogVisible = false; form.remark = ''">取 消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="onSubmitHandle">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="head-container">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData.list"
|
||||
v-loading="tableData.loading"
|
||||
border
|
||||
stripe
|
||||
>
|
||||
<el-table ref="table" :data="tableData.list" v-loading="tableData.loading" border stripe>
|
||||
<!-- <el-table-column label="商品信息" width="150px">
|
||||
<template v-slot="scope">
|
||||
<div class="shop_info">
|
||||
|
|
@ -86,23 +51,15 @@
|
|||
¥{{ formatDecimal(scope.row.lpAmount) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实际库存"
|
||||
prop="acStockNumber"
|
||||
></el-table-column>
|
||||
<el-table-column label="实际库存" prop="acStockNumber"></el-table-column>
|
||||
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
|
||||
<!-- <el-table-column label="盘点备注" prop="note"></el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination
|
||||
:total="tableData.total"
|
||||
:current-page="tableData.page + 1"
|
||||
:page-sizes="[5, 10, 30, 50]"
|
||||
:page-size="tableData.size"
|
||||
@current-change="paginationChange"
|
||||
@size-change="sizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-sizes="[5, 10, 30, 50]"
|
||||
:page-size="tableData.size" @current-change="paginationChange" @size-change="sizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
|
@ -165,7 +122,8 @@ export default {
|
|||
this.loading = true;
|
||||
let res = await tbConCheck({
|
||||
conInfoId: this.form.conInfoId,
|
||||
lpNum: this.profitNumber
|
||||
lpNum: this.profitNumber,
|
||||
remark: this.form.remark
|
||||
});
|
||||
this.detail.num = this.form.lpNum;
|
||||
this.form.lpNum = 0;
|
||||
|
|
@ -178,6 +136,7 @@ export default {
|
|||
message: `添加成功`,
|
||||
type: "success"
|
||||
});
|
||||
this.form.remark = ''
|
||||
this.getTableData();
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
|
|
|
|||
|
|
@ -113,14 +113,15 @@
|
|||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.price" :min="0" controls-position="right"
|
||||
@change="consCountTotal()"></el-input-number>
|
||||
@change="consCountTotal($event, scope.row, 'price')"></el-input-number>
|
||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.stockNumber" :min="0" controls-position="right"
|
||||
@change="consCountTotal()"></el-input-number>
|
||||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'stockNumber')"></el-input-number>
|
||||
<div class="tips">入库前:{{ scope.row.number }}{{ scope.row.conUnit }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -150,7 +151,7 @@
|
|||
<template v-slot="scope">
|
||||
<div class="name_wrap">
|
||||
<span class="name">{{ scope.row.name }}</span>
|
||||
<span v-if="scope.row.specSnap" >({{ scope.row.specSnap }})</span>
|
||||
<span v-if="scope.row.specSnap">({{ scope.row.specSnap }})</span>
|
||||
<!-- <el-tag type="info" v-if="scope.row.specSnap" size="mini">{{ scope.row.specSnap }}</el-tag> -->
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -158,14 +159,15 @@
|
|||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||
@change="modifyPrice($event, scope.row, 'costPrice')"></el-input-number>
|
||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||
<el-input-number v-model="scope.row.number" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||
<div class="tips">入库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -305,20 +307,50 @@ export default {
|
|||
this.queryForm.type = type
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
consCountTotal(cvalue, row, key1, key2 = undefined) {
|
||||
if (cvalue == undefined) {
|
||||
setTimeout(() => {
|
||||
row[key1] = 0
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}, 10)
|
||||
} else {
|
||||
row[key1] = cvalue
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}
|
||||
},
|
||||
// 计算商品总价
|
||||
modifyPrice() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
modifyPrice(cvalue, row, key1, key2 = undefined) {
|
||||
if (cvalue == undefined) {
|
||||
setTimeout(() => {
|
||||
row[key1] = 0
|
||||
row[key2] = 0
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}, 10)
|
||||
} else {
|
||||
row[key1] = cvalue
|
||||
row[key2] = cvalue
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
submitHandle() {
|
||||
|
|
|
|||
|
|
@ -110,14 +110,15 @@
|
|||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.price" :min="0" controls-position="right"
|
||||
@change="consCountTotal()"></el-input-number>
|
||||
@change="consCountTotal($event, scope.row, 'price')"></el-input-number>
|
||||
<div class="tips">原价¥{{ scope.row.costPrice }}/{{ scope.row.conUnit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.stockNumber" :min="0" controls-position="right"
|
||||
@change="consCountTotal()"></el-input-number>
|
||||
<el-input-number v-model="scope.row.stockNumber" :min="0" :step="1" step-strictly
|
||||
controls-position="right"
|
||||
@change="consCountTotal($event, scope.row, 'stockNumber')"></el-input-number>
|
||||
<div class="tips">出库前:{{ scope.row.number }}{{ scope.row.conUnit }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -153,14 +154,14 @@
|
|||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.costPrice" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.costPrice = e }"></el-input-number>
|
||||
@change="modifyPrice($event, scope.row, 'costPrice')"></el-input-number>
|
||||
<div class="tips">成本价¥{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||
@change="e => { modifyPrice(); scope.row.totalAmount = e }"></el-input-number>
|
||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||
<div class="tips">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -299,20 +300,50 @@ export default {
|
|||
this.queryForm.type = type
|
||||
},
|
||||
// 计算耗材总价
|
||||
consCountTotal() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
consCountTotal(cvalue, row, key1, key2 = undefined) {
|
||||
if (cvalue == undefined) {
|
||||
setTimeout(() => {
|
||||
row[key1] = 0
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}, 10)
|
||||
} else {
|
||||
row[key1] = cvalue
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.price * ele.stockNumber
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}
|
||||
},
|
||||
// 计算商品总价
|
||||
modifyPrice() {
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = zong
|
||||
modifyPrice(cvalue, row, key1, key2 = undefined) {
|
||||
if (cvalue == undefined) {
|
||||
setTimeout(() => {
|
||||
row[key1] = 0
|
||||
row[key2] = 0
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}, 10)
|
||||
} else {
|
||||
row[key1] = cvalue
|
||||
row[key2] = cvalue
|
||||
|
||||
let zong = 0
|
||||
this.tableData.list.forEach(ele => {
|
||||
zong += ele.costPrice * ele.number
|
||||
})
|
||||
this.queryForm.totalAmount = formatDecimal(zong)
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
submitHandle() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<el-form-item label="商品名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入商品名称" style="width: 500px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位">
|
||||
<el-form-item label="单位" prop="unitId">
|
||||
<el-select v-model="form.unitId" placeholder="请选择单位" style="width: 500px;" @change="selectUnitt">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in units" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -108,10 +108,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="起售数量" prop="suit">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.suit"
|
||||
controls-position="right"
|
||||
></el-input-number>
|
||||
<el-input-number v-model="scope.row.suit" controls-position="right"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" prop="stockNumber">
|
||||
|
|
@ -239,10 +236,7 @@
|
|||
<i class="icon el-icon-edit" @click="batchNumber('suit')"></i>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.suit"
|
||||
controls-position="right"
|
||||
></el-input-number>
|
||||
<el-input-number v-model="scope.row.suit" controls-position="right"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" prop="stockNumber">
|
||||
|
|
@ -454,6 +448,11 @@ export default {
|
|||
message: "请输入商品名称"
|
||||
}
|
||||
],
|
||||
unitId: [{
|
||||
required: true,
|
||||
trigger: "change",
|
||||
message: "请选择单位"
|
||||
}],
|
||||
categoryId: [
|
||||
{
|
||||
required: true,
|
||||
|
|
@ -578,8 +577,11 @@ export default {
|
|||
specInfo[index].realSalesNumber = item.productId;
|
||||
specInfo[index].shopId = item.shopId;
|
||||
specInfo[index].warnLine = item.warnLine;
|
||||
specInfo[index].suit = item.suit;
|
||||
specInfo[index].stockNumber = item.stockNumber;
|
||||
return specInfo[index];
|
||||
});
|
||||
console.log(this.form.skuList);
|
||||
this.originSkuList = [...this.form.skuList];
|
||||
this.selectSpecResult = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue