Browse Source

开单

master
tianyi@bogon 3 years ago
parent
commit
7c89f1dbfd
  1. 67
      pages/billing/changeGoods1.vue
  2. 21
      pages/inventory/addinventory.vue
  3. 2
      pages/inventory/changeGoods1.vue
  4. 252
      pages/inventory/goodsList1.vue

67
pages/billing/changeGoods1.vue

@ -66,16 +66,16 @@
<view class="popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}} <view class="popup-title-right-box" style="color: #088FEB;">{{goodsDetail.productName}}
</view> </view>
<view class="popup-title-right-box">{{goodsDetail.productSn}}</view> <view class="popup-title-right-box">{{goodsDetail.productSn}}</view>
<view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle"> <!-- <view class="popup-title-right-box" style="color: darkorange;" @tap="inputDialogToggle">
<text style="margin-right:20rpx;">修改价格</text> <text style="margin-right:20rpx;">修改价格</text>
</view> </view> -->
</view> </view>
</view> </view>
<view class="popup-container"> <view class="popup-container">
<view class="purchase-price" v-if="storageType == 0"> <!-- <view class="purchase-price" v-if="storageType == 0">
<view style="margin-right: 20rpx;">实际价格</view> <view style="margin-right: 20rpx;">实际价格</view>
<uni-easyinput type="text" v-model="purchasePrice" placeholder="请输入实际价格" /> <uni-easyinput type="text" v-model="purchasePrice" placeholder="请输入实际价格" />
</view> </view> -->
<ul style="border-top:20rpx;"> <ul style="border-top:20rpx;">
<li v-for="(items,index) in goodsDetail.attributeList" :key="index"> <li v-for="(items,index) in goodsDetail.attributeList" :key="index">
<view class="title-fur"> <view class="title-fur">
@ -115,11 +115,11 @@
<view class="popup-pay-title"> <view class="popup-pay-title">
<text>选择商品价格</text> <text>选择商品价格</text>
</view> </view>
<view class="popup-pay-container"> <view class="popup-pay-container" @tap="checkPay(goodsDetail.price)">
<text style="display: inline-block">零售价:¥29.99</text> <text style="display: inline-block">零售价:¥{{goodsDetail.price}}</text>
</view> </view>
<view class="popup-pay-container"> <view class="popup-pay-container" @tap="checkPay(goodsDetail.wholesalePrice)">
<text style="display: inline-block">批发价:¥25.99</text> <text style="display: inline-block">批发价:¥{{goodsDetail.wholesalePrice}}</text>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -159,10 +159,10 @@
<view class="popup-bottom"> <view class="popup-bottom">
<view class="popup-bottom-left"> <view class="popup-bottom-left">
<text>2 款 9 件</text> <text>{{carType}} 款 {{carNum}} 件</text>
</view> </view>
<view class="popup-bottom-right"> <view class="popup-bottom-right">
<view class="bottom-btn" @tap="">选好了</view> <view class="bottom-btn" @tap="this.$refs.carPopup.close()">关闭</view>
</view> </view>
</view> </view>
</view> </view>
@ -196,7 +196,9 @@
purchasePrice: 0, purchasePrice: 0,
zPrice:0, zPrice:0,
zNum:0, zNum:0,
storageType:0 storageType:0,
carNum:0,
carType:0
} }
}, },
onLoad() { onLoad() {
@ -232,13 +234,12 @@
this.goodsDetail.attributeList[index].value[index1].isChecked = true; this.goodsDetail.attributeList[index].value[index1].isChecked = true;
var name = '', var name = '',
evalue = [], evalue = [],
obj = {}, obj = {}
specsList = []
for (var i = 0; i < this.goodsDetail.attributeList.length; i++) { for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
for (var m = 0, Ien = this.goodsDetail.attributeList[i].value; m < Ien.length; m++) { for (var m = 0, Ien = this.goodsDetail.attributeList[i].value; m < Ien.length; m++) {
if (Ien[m].isChecked == true) { if (Ien[m].isChecked == true) {
evalue.push(Ien[m].value) evalue.push(Ien[m].value)
name += Ien[m].value name += Ien[m].value + '/'
} }
} }
} }
@ -259,6 +260,13 @@
name:name, name:name,
price:this.purchasePrice price:this.purchasePrice
} }
for(let i=0;i<this.goodsDetail.attributeList.length;i++){
this.goodsDetail.attributeList[i].isChecked = false;
for (let m=0;m<this.goodsDetail.attributeList[i].value.length;m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) { if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList); this.temporaryList.push(this.attributeList);
} else { } else {
@ -275,6 +283,7 @@
} }
} }
} }
}, },
@ -291,7 +300,7 @@
backPrevPage() { backPrevPage() {
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。 let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
let prevPage = pages[pages.length - 2]; //上一页页面实例 let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.carList = this.carList prevPage.$vm.carList1 = this.carList
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
@ -323,7 +332,10 @@
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
if (type == 'carPopup') { if (type == 'carPopup') {
this.$refs.carPopup.open('bottom') this.$refs.carPopup.open('bottom')
for (let i=0;i<this.carList.length;i++) {
this.carNum += this.carList[i].num
}
this.carType = this.carList.length
} else { } else {
this.checkGoods(item); this.checkGoods(item);
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
@ -390,12 +402,12 @@
}, },
//弹窗选择规格后,点击弹窗中选好了按钮 //弹窗选择规格后,点击弹窗中选好了按钮
temporaryCheck() { temporaryCheck() {
if(this.storageType == 0 && this.purchasePrice == 0){ // if(this.storageType == 0 && this.purchasePrice == 0){
uni.showToast({ // uni.showToast({
title: "请输入采购价!", // title: "请输入采购价!",
icon: 'none' // icon: 'none'
}) // })
}else{ // }else{
let data = { let data = {
id: this.goodsDetail.id, id: this.goodsDetail.id,
price: this.zPrice, price: this.zPrice,
@ -404,7 +416,9 @@
productSn: this.goodsDetail.productSn, productSn: this.goodsDetail.productSn,
productPicture: this.goodsDetail.productPicture, productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName, supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO:this.temporaryList saleDetailQueryDTO:this.temporaryList,
wholesalePrice:this.goodsDetail.wholesalePrice,
lsprice:this.goodsDetail.price
} }
this.carList.push(data) this.carList.push(data)
this.temporaryList = [] this.temporaryList = []
@ -418,7 +432,7 @@
} }
} }
this.$refs.popup.close() this.$refs.popup.close()
} // }
}, },
//删除整条商品 //删除整条商品
@ -457,6 +471,11 @@
} }
} }
} }
},
//选择是零售价还是批发价
checkPay(price){
this.purchasePrice = price;
this.$refs.inputDialog.close()
} }
} }
} }

21
pages/inventory/addinventory.vue

@ -26,8 +26,7 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)" <view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)" :key="key">
:key="key">
<view class="shop-name"> <view class="shop-name">
<img :src="value[1].productPicture" alt="" <img :src="value[1].productPicture" alt=""
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;"> style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;">
@ -122,7 +121,6 @@
}, },
khName: [], khName: [],
carList: new Map(), carList: new Map(),
lsList: new Map(),
remark: '', remark: '',
otherPay: 0, otherPay: 0,
noPay: 0, noPay: 0,
@ -140,7 +138,6 @@
if (typeof(val) == 'string') { if (typeof(val) == 'string') {
let newObj = JSON.parse(val) let newObj = JSON.parse(val)
for (let as in newObj) { for (let as in newObj) {
console.log(newObj[as])
name += newObj[as] + '/' name += newObj[as] + '/'
} }
} }
@ -152,7 +149,6 @@
this.khName = JSON.parse(JSON.stringify(this.khName)) || '' this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
//this.carList1 //上个页回来的 //this.carList1 //上个页回来的
//this.carList //这个页的最终数组 //this.carList //这个页的最终数组
//this.lsList //这个页的规格数组
console.log(this.carList1) console.log(this.carList1)
if (this.carList.size == 0) { //当前页没有数据 if (this.carList.size == 0) { //当前页没有数据
for (let i = 0; i < this.carList1.length; i++) { for (let i = 0; i < this.carList1.length; i++) {
@ -174,7 +170,6 @@
console.log("没有数据") console.log("没有数据")
this.carList.set(this.carList1[i].id, obj) this.carList.set(this.carList1[i].id, obj)
console.log(this.carList) console.log(this.carList)
// this.lsList.set(this.carList1[i].id, obj)
} }
this.carList1 = [] this.carList1 = []
} else { //当前页有数据 } else { //当前页有数据
@ -220,7 +215,6 @@
} }
console.log('carList1', this.carList1) console.log('carList1', this.carList1)
console.log('carList', this.carList) console.log('carList', this.carList)
console.log('lsList', this.lsList)
this.carList.forEach(function(value, key) { this.carList.forEach(function(value, key) {
that.totalAmount += value.productCount that.totalAmount += value.productCount
}) })
@ -343,18 +337,7 @@
that.carList.forEach(function(value, key) { that.carList.forEach(function(value, key) {
that.shouldPay += value.price that.shouldPay += value.price
}) })
// this.carList.get(this.index)
// this.shouldPay = 0
// this.carList[this.index].price = 0
// this.carList[this.index].saleDetailQueryDTO[this.index1].price = val;
// console.log(this.carList)
// for (let m = 0; m < this.carList[this.index].saleDetailQueryDTO.length; m++) {
// this.carList[this.index].price += this.carList[this.index].saleDetailQueryDTO[m].productCount * this
// .carList[this.index].saleDetailQueryDTO[m].price
// }
// for (let i = 0; i < this.carList.length; i++) {
// this.shouldPay += this.carList[i].price
// }
} }
} }
} }

2
pages/inventory/changeGoods1.vue

@ -147,7 +147,7 @@
<text>{{carType}} 款 {{carNum}} 件</text> <text>{{carType}} 款 {{carNum}} 件</text>
</view> </view>
<view class="popup-bottom-right"> <view class="popup-bottom-right">
<view class="bottom-btn" @tap="">选好了</view> <view class="bottom-btn" @tap="this.$refs.carPopup.close()">选好了</view>
</view> </view>
</view> </view>
</view> </view>

252
pages/inventory/goodsList1.vue

@ -33,55 +33,61 @@
</view> </view>
<view class="shop-box"> <view class="shop-box">
<view class="content-list"> <view class="content-list">
<view class="list-name">折扣类型</view> <view class="list-name" style="width:150rpx">折扣类型</view>
<view class="list-val"> <view class="list-val" style="width:560rpx;display: flex;">
<radio-group @change="radioChange" style="display: flex;"> <radio-group @change="discountChange" style="display: flex;">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items"
:key="item.value"> :key="item.value">
<view> <view>
<radio :value="item.value" :checked="index === current" /> <radio :value="item.value" :checked="index === discountCurrent" />
</view> </view>
<view>{{item.name}}</view> <view>{{item.name}}</view>
</label> </label>
</radio-group> </radio-group>
<view class="discount-num" v-if="discountType == '1'">
<uni-number-box :min="0.1" :max="10" :value="discountNum" :step="0.1" @change="change"/>
</view> </view>
</view> </view>
</view> </view>
<view class="shop-box" style="border-top:5px solid #eee;" v-for="item in carList" :key="item"> </view>
<view class="shop-name"> <view class="shop-box" style="border-top:5px solid #eee;" v-for="(value,key) in Array.from(carList)" :key="key">
<img :src="item.productPicture" alt="" <view class="shop-name" style="position: relative;">
<img :src="value[1].productPicture" alt=""
style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;"> style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;">
<view class="shop-productName"> <view class="shop-productName">
<view style="color:#FF5809;">品名:{{item.productName}}</view> <view style="color:#FF5809;">品名:{{value[1].productName}} ({{value[1].productSn}})</view>
<view>货号:{{item.barcode}}</view> <view>单价:{{value[1].purchasePrice}} 数量:{{value[1].productCount}} 总价:{{value[1].price}}</view>
<view>供应商:{{item.supplierName}}</view> <view>供应商:{{value[1].supplierName}}</view>
</view>
<view style="position: absolute;top: 110rpx;right: 40rpx;color: blue;text-decoration: underline;"
@tap="clickPrice(value[0])">
选择售价
</view> </view>
</view> </view>
<view class="shop-type"> <view class="shop-type">
<view class="shop-collapse" @tap="clickCollapse"> <view class="shop-collapse-item" v-if="discountType == '0'">
<text>{{item.saleDetailQueryDTO.attributeList}}</text>
<text style="color: red;">¥{{item.price * item.num}}</text>
<text>{{item.num}}</text>
<uni-icons type="bottom" size="16"
style="margin-left: 112rpx;line-height: 80rpx;"></uni-icons>
</view>
<view class="shop-collapse-item" v-if="isCollapse">
<view class="collapse-1"> <view class="collapse-1">
<text>单价</text> <text>单价</text>
<input class="input" type="text" :value='item.price'> <input class="input" type="text" :value='value[1].purchasePrice'>
</view> </view>
<view class="collapse-1"> <view class="collapse-1">
<text>折扣(100%)</text> <text>折扣(100%)</text>
<input class="input" type="text" value='0'> <input class="input" type="text" :value='value[1].discount'>
</view> </view>
<view class="collapse-1"> <view class="collapse-1">
<text>折后价</text> <text>折后价</text>
<input class="input" type="text" value='0'> <input class="input" type="text" :value='value[1].discountAmount'>
</view> </view>
<view class="collapse-1"> <view class="collapse-1">
<text>数量</text> <text>数量</text>
<input class="input" type="text" value='0'> <input class="input" type="text" :value='value[1].productCount'>
</view>
</view> </view>
<view class="shop-collapse" v-for="(values,keys) in Array.from(value[1].stockLogList)">
<text>{{values[0] | sliceMsg}}</text>
<!-- <text style="color: red;">¥100</text> -->
<text>数量:{{values[1]}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -190,13 +196,27 @@
</view> </view>
<view class="bottom-box"> <view class="bottom-box">
<view class="bottom-left"> <view class="bottom-left">
<text>合计:2</text> <text>合计:{{totalAmount}}</text>
<text style="color: #ffa200;">¥20.00</text> <text style="color: #ffa200;">¥{{shouldPay}}</text>
</view> </view>
<view class="bottom-right"> <view class="bottom-right">
<button class="bottom-btn" @tap="goSell">开单</button> <button class="bottom-btn" @tap="goSell">开单</button>
</view> </view>
</view> </view>
<!-- 弹出输入框 -->
<uni-popup ref="inputDialog" background-color="#fff">
<view class="popup-pay-content">
<view class="popup-pay-title">
<text>选择商品价格</text>
</view>
<view class="popup-pay-container" @tap="checkPay(lsprice)">
<text style="display: inline-block">零售价:¥{{lsprice}}</text>
</view>
<view class="popup-pay-container" @tap="checkPay(wholesalePrice)">
<text style="display: inline-block">批发价:¥{{wholesalePrice}}</text>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -205,19 +225,21 @@
components: {}, components: {},
data() { data() {
return { return {
lsprice:0,//临时零售价
wholesalePrice:0, // 临时显示批发价
price: '0', //总金额 price: '0', //总金额
relPrice: '0', //已付金额 relPrice: '0', //已付金额
otherExpense: '0', // 其他费用 otherExpense: '0', // 其他费用
priceNo: '0', //未付金额 priceNo: '0', //未付金额
discountNum:10,
value: '', value: '',
isCollapse: false,
items: [{ items: [{
value: '0', value: '0',
name: '单品折扣' name: '单品折'
}, },
{ {
value: '1', value: '1',
name: '整体折扣' name: '整体折'
} }
], ],
logisticsType: [{ logisticsType: [{
@ -241,6 +263,9 @@
name: '自送' name: '自送'
}, },
], ],
discountType:'',
discountCurrent:'',
current:'',
discCurrent: '', //折扣 discCurrent: '', //折扣
logisticsCurrent: '', //物流 logisticsCurrent: '', //物流
categoryList: '', //销售员 categoryList: '', //销售员
@ -250,22 +275,110 @@
wlName: [], //物流公司/物流/发车 wlName: [], //物流公司/物流/发车
kdyName: [], //快递员 kdyName: [], //快递员
lbgName: [], //拉包工姓名 lbgName: [], //拉包工姓名
carList: [], //添加商品页传回来的商品信息 carList: new Map(), //添加商品页传回来的商品信息
xsyId: '' xsyId: '',
shouldPay:0,
totalAmount: 0
} }
}, },
onShow() { onShow() {
let that = this;
this.khName = JSON.parse(JSON.stringify(this.khName)) || '' this.khName = JSON.parse(JSON.stringify(this.khName)) || ''
this.gysName = JSON.parse(JSON.stringify(this.gysName)) || '' this.gysName = JSON.parse(JSON.stringify(this.gysName)) || ''
this.wlName = JSON.parse(JSON.stringify(this.wlName)) || '' this.wlName = JSON.parse(JSON.stringify(this.wlName)) || ''
this.kdyName = JSON.parse(JSON.stringify(this.kdyName)) || '' this.kdyName = JSON.parse(JSON.stringify(this.kdyName)) || ''
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) || '' this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) || ''
this.carList = this.carList || '' if (this.carList.size == 0) { //当前页没有数据
for (let i = 0; i < this.carList1.length; i++) {
let obj = {
purchasePrice: this.carList1[i].price, //最后的价格
price: 0, //总价
discount:10, //折扣
discountAmount:0, //折后价
wholesalePrice:this.carList1[i].wholesalePrice, //批发价
lsprice:this.carList1[i].lsprice, //零售价
productCount: 0, //总数量
productId: this.carList1[i].id,
productName: this.carList1[i].productName,
productPicture: this.carList1[i].productPicture,
productSn: this.carList1[i].productSn,
stockLogList: new Map(),
stockLogList1: [],
supplierName:this.carList1[i].supplierName //供应商
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
.saleDetailQueryDTO[m].productCount)
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
console.log("没有数据")
this.carList.set(this.carList1[i].id, obj)
console.log(this.carList) console.log(this.carList)
// this.lsList.set(this.carList1[i].id, obj)
}
this.carList1 = []
} else { //当前页有数据
for (let i = 0; i < this.carList1.length; i++) {
if (this.carList.has(this.carList1[i].id) == true) { //商品相同
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
if (this.carList.get(this.carList1[i].id).stockLogList.has(this.carList1[i].saleDetailQueryDTO[m].attributeList) == true) { //规格相同
console.log("规格相同")
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList.get(this.carList1[i].id).stockLogList.get(this.carList1[i].saleDetailQueryDTO[m].attributeList) + this.carList1[i].saleDetailQueryDTO[m].productCount)
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
} else { //规格不同
console.log("规格不同")
this.carList.get(this.carList1[i].id).stockLogList.set(this.carList1[i].saleDetailQueryDTO[
m].attributeList, this.carList1[i].saleDetailQueryDTO[m].productCount)
this.carList.get(this.carList1[i].id).productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
}
} else { //商品不同
let obj = {
purchasePrice: this.carList1[i].price, //最后的价格
price: 0,
discount:10,
discountAmount:0,
wholesalePrice:this.carList1[i].wholesalePrice, //批发价
lsprice:this.carList1[i].lsprice, //零售价
productCount: 0,
productId: this.carList1[i].id,
productName: this.carList1[i].productName,
productPicture: this.carList1[i].productPicture,
stockLogList: new Map(),
stockLogList1: [],
productSn: this.carList1[i].productSn,
supplierName:this.carList1[i].supplierName
}
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) {
obj.stockLogList.set(this.carList1[i].saleDetailQueryDTO[m].attributeList, this.carList1[i]
.saleDetailQueryDTO[m].productCount)
obj.productCount += this.carList1[i].saleDetailQueryDTO[m].productCount
}
this.carList.set(this.carList1[i].id, obj)
}
// for (var i= 0;i<) { }
this.carList1 = []
// } }
console.log('carList1', this.carList1)
console.log('carList', this.carList)
this.carList.forEach(function(value, key) {
that.totalAmount += value.productCount
})
this.noPay = this.shouldPay
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
}, },
onLoad() { onLoad() {
this.xsyList(); this.xsyList();
@ -294,10 +407,18 @@
} }
} }
}, },
//点击切换折叠状态 //折扣种类选择
clickCollapse() { discountChange(e){
this.isCollapse = !this.isCollapse //快递0 物流1 发车2 拼包3 自送4
this.discountType = e.detail.value;
for (let i = 0; i < this.items.length; i++) {
if (this.items[i].value === e.detail.value) {
this.discountCurrent = i;
break;
}
}
}, },
//点击发货方式按钮
radioChange(e) { radioChange(e) {
this.khName = '' this.khName = ''
this.gysName = '' this.gysName = ''
@ -313,6 +434,7 @@
} }
} }
}, },
//发货方式选择
goPopleList(popleType) { goPopleList(popleType) {
if (popleType == 'kdyName' && this.wlName == '') { if (popleType == 'kdyName' && this.wlName == '') {
uni.showToast({ uni.showToast({
@ -327,11 +449,13 @@
url: '/pages/index/peopleList?popleType=' + popleType + '&companyType=' + companyType url: '/pages/index/peopleList?popleType=' + popleType + '&companyType=' + companyType
}) })
}, },
//点击加号手动添加商品
goodsAdd() { goodsAdd() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/billing/changeGoods1' url: '/pages/billing/changeGoods1'
}) })
}, },
//点击底部开单按钮
goSell() { goSell() {
// console.log(this.khName) // console.log(this.khName)
// console.log(this.lbgName) // console.log(this.lbgName)
@ -386,6 +510,25 @@
} }
}) })
},
//编辑每一个的单价
clickPrice(index) {
console.log(index)
this.index = index
this.wholesalePrice = this.carList.get(this.index).wholesalePrice
this.lsprice = this.carList.get(this.index).lsprice
this.$refs.inputDialog.open()
},
//选择是零售价还是批发价
checkPay(price){
let that = this;
this.shouldPay = 0
this.carList.get(this.index).purchasePrice = price;
that.carList.get(that.index).price = price * that.carList.get(that.index).productCount;
this.$refs.inputDialog.close()
that.carList.forEach(function(value, key) {
that.shouldPay += value.price
})
} }
} }
} }
@ -396,7 +539,14 @@
.page1 { .page1 {
height: 100%; height: 100%;
} }
.popup-pay-content{
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: auto;
background-color: #fff;
}
.content { .content {
border-top: 1px solid #eee; border-top: 1px solid #eee;
overflow-y: scroll; overflow-y: scroll;
@ -410,6 +560,24 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.popup-pay-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.popup-pay-container {
margin-top: 20rpx;
height: 100rpx;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
.content-list { .content-list {
width: 95%; width: 95%;
@ -486,7 +654,9 @@
font-weight: bold; font-weight: bold;
display: flex; display: flex;
} }
.discount-num{
width: 200rpx;
}
.shop-productName { .shop-productName {
flex: 1; flex: 1;
display: flex; display: flex;
@ -505,11 +675,15 @@
// } // }
.shop-collapse { .shop-collapse {
border-radius: 1px solid #eee; display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
} }
.shop-collapse text { .shop-collapse text {
text-align: right; flex: 1;
text-align: center;
padding-right: 40rpx; padding-right: 40rpx;
border-right: 1px solid #eee; border-right: 1px solid #eee;
} }

Loading…
Cancel
Save