wangfukang 4 days ago
parent
commit
dd81d92ba1
  1. 8
      src/views/app/components/withdrawRecordModal.vue
  2. 26
      src/views/app/shop/dictManage.vue

8
src/views/app/components/withdrawRecordModal.vue

@ -2,11 +2,16 @@
.withdraw-record-owner {
margin-bottom: 12px;
}
.withdraw-record-balance {
margin-left: 24px;
}
</style>
<template>
<Modal :title="title" v-model="visible" :mask-closable="false" :width="1100">
<div class="withdraw-record-owner">
<span>{{ ownerLabel }}:{{ ownerName }}</span>
<span v-if="ownerType === 'shop'" class="withdraw-record-balance">账户余额:{{ ownerBalance }}</span>
</div>
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize"></Table>
<Row type="flex" justify="end" class="page">
@ -117,6 +122,9 @@
return this.ownerInfo.workerName || "-";
}
return this.ownerInfo.shopName || "-";
},
ownerBalance() {
return this.formatAmount(this.ownerInfo.balance);
}
},
methods: {

26
src/views/app/shop/dictManage.vue

@ -77,6 +77,16 @@
flex-wrap: wrap;
min-width: 0;
}
.goods-attribute-delete {
flex: 0 0 auto;
width: 60px;
height: 30px;
line-height: 30px;
color: #ed4014;
border: none;
background: transparent;
cursor: pointer;
}
.goods-attribute-value {
margin: 0 6px 6px 0;
padding: 0 8px;
@ -329,7 +339,7 @@
<Col span="24">
<FormItem label="商品属性" class="form-noheight">
<div class="goods-attribute-list">
<div v-for="(value,key) in Array.from(addGoodsForm.attributeList1)" :key="key" class="goods-attribute-row">
<div v-for="(value,key) in Array.from(addGoodsForm.attributeList1)" :key="value[0]" class="goods-attribute-row">
<div class="goods-attribute-canbuy">
<span>可选:</span>
<Input v-model="value[1].canbuy" type="number" placeholder="1" @on-change="onCanbuyChange(value[0], value[1].canbuy)" />
@ -340,6 +350,7 @@
{{item}}
</span>
</div>
<button type="button" class="goods-attribute-delete" @click.stop.prevent="deleteGoodsAttribute(value[0])">删除</button>
</div>
<div @click="checkSpec('shuxing')" style="width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
选择属性
@ -1064,6 +1075,19 @@
this.addGoodsForm.attributeList1.set(categoryName, entry)
}
},
deleteGoodsAttribute(attributeName){
const source = this.addGoodsForm.attributeList1
let entries = []
if (source instanceof Map) {
entries = Array.from(source)
} else if (source && typeof source === "object") {
entries = Object.entries(source)
}
const attributeListMap = new Map(entries.filter(item => item[0] != attributeName))
this.$set(this.addGoodsForm, "attributeList1", attributeListMap)
this.attrValueArr = (this.attrValueArr || []).filter(item => item.parentName != attributeName)
this.$forceUpdate()
},
isRequestSuccess(res) {
return res && (res.success || res.code == 200);
},

Loading…
Cancel
Save