Commit 678d414f authored by wuxiaoli's avatar wuxiaoli

Merge branch 'dev' of http://rungit.jxdsy.cn:10000/sugar/jwhx into dev

parents d5c6390f 030cd585
...@@ -74,6 +74,10 @@ ...@@ -74,6 +74,10 @@
<small>数量:</small>{{ totalCount }}<small>金额:</small>{{ totalMoney }} <small>数量:</small>{{ totalCount }}<small>金额:</small>{{ totalMoney }}
<small>所需积分:</small>{{ totaljifen }} <small>所需积分:</small>{{ totaljifen }}
</div>
<div class="total">
<small>需付:</small>{{Userprice }}
</div> </div>
<div class="pos_btn"> <div class="pos_btn">
...@@ -96,6 +100,8 @@ ...@@ -96,6 +100,8 @@
</el-select> </el-select>
<el-button-group style="margin-left: 10px;"> <el-button-group style="margin-left: 10px;">
<el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button>
<el-button type="danger" icon="el-icon-plus" @click="add">添加产品</el-button>
</el-button-group> </el-button-group>
</div> </div>
</el-header> </el-header>
...@@ -111,8 +117,9 @@ ...@@ -111,8 +117,9 @@
<el-table-column label="操作" fixed="right" align="center" width="140"> <el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-button type="primary" @click="addOrderList(scope.row, scope.$index)">添加</el-button> <el-button type="primary" @click="addOrderList(scope.row, scope.$index)">加购</el-button>
<el-button type="primary" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
...@@ -177,6 +184,7 @@ ...@@ -177,6 +184,7 @@
</el-dialog> </el-dialog>
<save v-if="dialog.save" ref="saveBox" @success="upsearch" @closed="dialog.save=false" />
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
...@@ -185,10 +193,13 @@ ...@@ -185,10 +193,13 @@
import { ElLoading, ElMessage } from "element-plus"; import { ElLoading, ElMessage } from "element-plus";
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import qrcode from "@/components/qrcode/qrcode.vue"; import qrcode from "@/components/qrcode/qrcode.vue";
import save from '../goods/lists/save.vue';
export default { export default {
name: "ucenter.cashierhome", name: "ucenter.cashierhome",
components: { components: {
qrcode, qrcode,
save
}, },
data() { data() {
return { return {
...@@ -231,7 +242,7 @@ export default { ...@@ -231,7 +242,7 @@ export default {
mirror: [], mirror: [],
total: 0, total: 0,
totaljifen:0,//总共所需积分 totaljifen:0,//总共所需积分
Userprice:0,//不使用积分的价格
qrcodeurl:"", qrcodeurl:"",
...@@ -254,7 +265,7 @@ export default { ...@@ -254,7 +265,7 @@ export default {
newValue.forEach((item) => { newValue.forEach((item) => {
item.content.forEach((cc) => { item.content.forEach((cc) => {
total += Number(cc.readyPrice) * Number(cc.num); total += parseFloat(cc.readyPrice) * Number(cc.num);
totalCount = totalCount + cc.num; totalCount = totalCount + cc.num;
totaljifen += Number(cc.ready_integral) * Number(cc.num) totaljifen += Number(cc.ready_integral) * Number(cc.num)
...@@ -268,11 +279,25 @@ export default { ...@@ -268,11 +279,25 @@ export default {
this.totalCount = totalCount; this.totalCount = totalCount;
this.totaljifen = totaljifen;//积分 this.totaljifen = totaljifen;//积分
this.Userprice = parseFloat(parseFloat(total) + parseInt(this.totaljifen)).toFixed(2);
}, },
deep: true, deep: true,
} }
}, },
methods: { methods: {
add(){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open().setData({})
})
},
table_edit(row){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open('edit').setData(row)
})
},
//---规格加入购物车------------------------------------------------------------------------- //---规格加入购物车-------------------------------------------------------------------------
popCloseHandle() { popCloseHandle() {
this.$emit("close"); this.$emit("close");
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
<el-form-item label="标签" prop="tags"> <el-form-item label="标签" prop="tags">
<sc-tag-input v-model="form.tags" placeholder="请输入标签"/> <sc-tag-input v-model="form.tags" placeholder="请输入标签"/>
</el-form-item> </el-form-item>
<el-form-item label="产品编码" prop="goods_sn">
<el-input type="textarea" v-model="form.goods_sn" placeholder="请输入产品编码" clearable />
</el-form-item>
<el-form-item label="简述" prop="description"> <el-form-item label="简述" prop="description">
<el-input type="textarea" v-model="form.description" placeholder="请输入简述" clearable /> <el-input type="textarea" v-model="form.description" placeholder="请输入简述" clearable />
</el-form-item> </el-form-item>
......
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