Commit 99f8e308 by 萱草

update: 礼品管理

parent 696347dd
......@@ -9,6 +9,10 @@ export default [
{
path: 'virtual-gift',
component: () => import('@/views/gift-manage/virtual-gift.vue'),
},
{
path: 'virtual-gift-detail',
component: () => import('@/views/gift-manage/virtual-gift-detail.vue'),
}
],
},
......
<template>
<el-dialog title="调整成本问题" :visible.sync="dialogVisible" width="500px" @close="cancelSubmit()">
<el-dialog title="调整成本费用" :visible.sync="dialogVisible" width="500px" @close="cancelSubmit()">
<div v-loading="loading">
<el-input-number v-model="updateCostData.costPrice" precision="2" :min="0" :max="999999.99" style="width:400px"></el-input-number>
<el-input type="textarea" :rows="3" placeholder="请填入调整备注" v-model="updateCostData.textarea" :max="240"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit()">取消</el-button>
......
......@@ -18,6 +18,7 @@
</template>
</el-table-column>
</el-table>
<el-input type="textarea" :rows="3" placeholder="请填入调整备注" v-model="updateCostData.textarea" :max="240"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit()">取消</el-button>
......
......@@ -33,6 +33,7 @@
</template>
</el-table-column>
</el-table>
<el-input type="textarea" :rows="3" placeholder="请填入调整备注" v-model="stockData.textarea" :max="240"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit()">取消</el-button>
......@@ -45,7 +46,7 @@
// import request from '../service/request.js';
export default {
props: {
updateCostData: {
stockData: {
type: Object,
default() {
return {};
......
......@@ -6,6 +6,7 @@
<el-option label="减少" :value="2"></el-option>
</el-select>
<el-input-number v-model="stockData.remainedStock" precision="2" :min="0" :max="999999" style="width:300px"></el-input-number>
<el-input type="textarea" :rows="3" placeholder="请填入调整备注" v-model="stockData.textarea" :max="240"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit()">取消</el-button>
......
......@@ -36,30 +36,31 @@
<div class="spanclass">-</div>
<dm-input-amount precision="2" :min="0" :max="9999999.99" class="mr20 ml10 w100" v-model.trim="costValue2"></dm-input-amount>
<div class="spanclass">可占库存</div>
<dm-input-number precision="2" :min="0" :max="9999999" class="mr10 ml10 w100" v-model="remainedStock1"></dm-input-number>
<dm-input-number precision="0" :min="0" :max="9999999" class="mr10 ml10 w100" v-model="remainedStock1" placeholder="请输入"></dm-input-number>
<div class="spanclass">-</div>
<dm-input-number precision="2" :min="0" :max="9999999" class="ml10 w100" v-model="remainedStock2"></dm-input-number>
<dm-input-number precision="0" :min="0" :max="9999999" class="ml10 w100" v-model="remainedStock2" placeholder="请输入"></dm-input-number>
</div>
<div class="table-content">
<el-table :data="tableData" ref="multipleTable" style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="礼品信息" width="360px">
<el-table-column label="礼品信息" width="200px">
<template slot-scope="scope">
<div class="img-text">
<dm-preview-img :img="scope.row.goodsImageUrl" style="display:inline-block;border: 1px solid #dcdfe6;padding:4px;border-radius:2px;" width="50" height="50"></dm-preview-img>
<div class="text">
<p class="goods-descript">
<el-tooltip class="item" effect="dark" :content="'福利id:' + scope.row.giftId" placement="top-start">
<span>{{ scope.row.giftName }}</span>
</el-tooltip>
<span>{{ scope.row.giftName }}</span>
<i class="el-icon-edit-outline" @click="handleName(scope.row)"></i>
</p>
<p class="goods-code">礼品编码:{{ scope.row.giftNo }}</p>
<p class="goods-code">更新时间:{{ scope.row.updateName }}</p>
<p class="goods-code">福利id:{{ scope.row.giftId }}</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="costPrice" label="更新时间" sortable="custom" min-width="150px">
<template slot-scope="scope">{{ scope.row.updateName }}</template>
</el-table-column>
<el-table-column prop="costPrice" label="成本" sortable="custom" min-width="150px">
<template slot-scope="scope">
<p class="stock-box">
......@@ -69,6 +70,17 @@
</template>
</el-table-column>
<el-table-column sortable="custom" label="库存" min-width="120px">
<template slot="header">
<el-tooltip open-delay="200" effect="dark" style="width:250px" placement="top">
<span class="undeline-dash">库存</span>
<span slot="content">
可占库存:福利可以被直接使用和被应用占用的数量;<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;<br>
总库存:福利实际未产生履约单,还可以被出库的数量;<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div>
<p class="stock-box">
......@@ -83,6 +95,17 @@
</template>
</el-table-column>
<el-table-column prop="allExchangeNumber" label="总出库量" sortable="custom" min-width="100px">
<template slot="header">
<el-tooltip open-delay="200" effect="dark" style="width:250px" placement="top">
<span class="undeline-dash">总出库量</span>
<span slot="content">
可占库存:福利可以被直接使用和被应用占用的数量;<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;<br>
总库存:福利实际未产生履约单,还可以被出库的数量;<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<span>{{ scope.row.historyTotalStock }}</span>
</template>
......@@ -102,10 +125,8 @@
<div style="font-size:0px">
<dm-perm-button type="text" @click="edit(scope.row, 2)">编辑</dm-perm-button>
<dm-perm-button type="text">库存记录</dm-perm-button>
<dm-delete @confirm="deleteList(scope.row, 0)" tips="禁用后,该福利将不可用,确认禁用该礼品?">
<el-button type="text">禁用</el-button>
</dm-delete>
<!-- <dm-perm-button type="text">启用</dm-perm-button> -->
<el-button v-if="scope.row.statusFlag === 0" type="text">禁用</el-button>
<el-button type="text" v-if="scope.row.statusFlag === 1">启用</el-button>
</div>
</template>
</el-table-column>
......@@ -199,7 +220,8 @@ export default {
// 更新成本数据
updateCostData: {
costPrice: '',
id: ''
id: '',
textarea: ''
},
updateCostDialog: false,
// 更新名称
......@@ -212,7 +234,8 @@ export default {
// 更新库存
stockData: {
id: '',
remainedStock: ''
remainedStock: '',
textarea: '',
},
StockDialog: false,
// 积分费用
......@@ -229,8 +252,8 @@ export default {
timeValue: '',
costValue1: '', // 条件筛选最低成本
costValue2: '', // 条件筛选最高成本
remainedStock1: '', // 条件筛选最低可占库存
remainedStock2: '', // 条件筛选最高可占库存
remainedStock1: undefined, // 条件筛选最低可占库存
remainedStock2: undefined, // 条件筛选最高可占库存
};
},
created() {
......@@ -375,12 +398,14 @@ export default {
updateStock(item) {
// this.stockData.id = item.goodsId;
this.stockData.remainedStock = item.remainedStock;
this.stockData.textarea = item.textarea;
console.log(this.stockData.remainedStock);
this.StockDialog = true;
},
closeUpdateStock() {
// this.stockData.id = '';
this.stockData.remainedStock = '';
this.stockData.textarea = '';
this.StockDialog = false;
},
// 虚拟礼品库存调整
......@@ -419,6 +444,7 @@ export default {
console.log('修改成本', item);
this.updateCostData.id = item.giftId;
this.updateCostData.costPrice = item.costPrice;
this.updateCostData.textarea = item.textarea;
this.updateCostDialog = true;
},
closeUpdateCost() {
......@@ -495,14 +521,13 @@ export default {
.goods-descript {
color: #606266;
line-height: 18px;
height: 36px;
font-size: 14px;
margin-bottom: 10px;
}
.goods-code {
color: #909399;
font-size: 12px;
line-height: 17px;
margin-top: 5px;
line-height: 16px;
}
}
& :hover .el-icon-edit-outline {
......
......@@ -36,30 +36,32 @@
<div class="spanclass">-</div>
<dm-input-amount precision="2" :min="0" :max="9999999.99" class="mr20 ml10 w100" v-model.trim="costValue2"></dm-input-amount>
<div class="spanclass">可占库存</div>
<dm-input-number precision="2" :min="0" :max="9999999" class="mr10 ml10 w100" v-model="remainedStock1"></dm-input-number>
<dm-input-number precision="0" :min="0" :max="9999999" class="mr10 ml10 w100" v-model="remainedStock1" placeholder="请输入"></dm-input-number>
<div class="spanclass">-</div>
<dm-input-number precision="2" :min="0" :max="9999999" class="ml10 w100" v-model="remainedStock2"></dm-input-number>
<dm-input-number precision="0" :min="0" :max="9999999" class="ml10 w100" v-model="remainedStock2" placeholder="请输入"></dm-input-number>
</div>
<div class="table-content">
<el-table :data="tableData" ref="multipleTable" style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="礼品信息" width="360px">
<el-table-column label="礼品信息" width="300px">
<template slot-scope="scope">
<div class="img-text">
<dm-preview-img :img="scope.row.goodsImageUrl" style="display:inline-block;border: 1px solid #dcdfe6;padding:4px;border-radius:2px;" width="50" height="50"></dm-preview-img>
<div class="text">
<p class="goods-descript">
<el-tooltip class="item" effect="dark" :content="'福利id:' + scope.row.giftId" placement="top-start">
<span>{{ scope.row.giftName }}</span>
</el-tooltip>
<span>{{ scope.row.giftName }}</span>
<i class="el-icon-edit-outline" @click="handleName(scope.row)"></i>
</p>
<p class="goods-code">礼品编码:{{ scope.row.giftNo }}</p>
<p class="goods-code">更新时间:{{ scope.row.updateName }}</p>
<p class="goods-code">福利id:{{ scope.row.giftId }}</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="updateTime" label="更新时间" sortable="custom" min-width="150px">
<!-- <template slot-scope="scope">{{ formatDateTimeByType(scope.row.updateName) }}</template> -->
<template slot-scope="scope"><span v-html="formatDateTimeByType(scope.row.updateTime)"></span></template>
</el-table-column>
<el-table-column prop="costPrice" label="成本" sortable="custom" min-width="150px">
<template slot-scope="scope">
<p class="stock-box">
......@@ -69,6 +71,17 @@
</template>
</el-table-column>
<el-table-column sortable="custom" label="库存" min-width="120px">
<template slot="header">
<el-tooltip open-delay="200" effect="dark" style="width:250px" placement="top">
<span class="undeline-dash">库存</span>
<span slot="content">
可占库存:福利可以被直接使用和被应用占用的数量;<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;<br>
总库存:福利实际未产生履约单,还可以被出库的数量;<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<div>
<p class="stock-box">
......@@ -83,6 +96,17 @@
</template>
</el-table-column>
<el-table-column prop="allExchangeNumber" label="总出库量" sortable="custom" min-width="100px">
<template slot="header">
<el-tooltip open-delay="200" effect="dark" style="width:250px" placement="top">
<span class="undeline-dash">总出库量</span>
<span slot="content">
可占库存:福利可以被直接使用和被应用占用的数量;<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;<br>
总库存:福利实际未产生履约单,还可以被出库的数量;<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<span>{{ scope.row.historyTotalStock }}</span>
</template>
......@@ -102,10 +126,8 @@
<div style="font-size:0px">
<dm-perm-button type="text" @click="edit(scope.row, 2)">编辑</dm-perm-button>
<dm-perm-button type="text">库存记录</dm-perm-button>
<dm-delete @confirm="deleteList(scope.row, 0)" tips="禁用后,该福利将不可用,确认禁用该礼品?">
<el-button type="text">禁用</el-button>
</dm-delete>
<!-- <dm-perm-button type="text">启用</dm-perm-button> -->
<el-button v-if="scope.row.statusFlag === 0" type="text">禁用</el-button>
<el-button type="text" v-if="scope.row.statusFlag === 1">启用</el-button>
</div>
</template>
</el-table-column>
......@@ -143,6 +165,9 @@ import updateName from './module/update-name.vue';
import updateMultiStock from './module/update-multi-stock.vue';
// import updateSkuIntegral from '../../components/updateSkuIntegral';
// import { mapGetters } from 'vuex';
import { formatDateTimeByType } from '@/utils/index.js';
import api from '@/api/gift.js';
const { giftPage } = api;
export default {
components: {
// UpdateCost,
......@@ -197,7 +222,8 @@ export default {
// 更新成本数据
updateCostData: {
costPrice: '',
id: ''
id: '',
textarea: ''
},
updateCostDialog: false,
// 更新名称
......@@ -210,7 +236,8 @@ export default {
// 更新库存
stockData: {
id: '',
remainedStock: ''
remainedStock: '',
textarea: '',
},
StockDialog: false,
// 积分费用
......@@ -227,8 +254,8 @@ export default {
timeValue: '',
costValue1: '', // 条件筛选最低成本
costValue2: '', // 条件筛选最高成本
remainedStock1: '', // 条件筛选最低可占库存
remainedStock2: '', // 条件筛选最高可占库存
remainedStock1: undefined, // 条件筛选最低可占库存
remainedStock2: undefined, // 条件筛选最高可占库存
};
},
created() {
......@@ -249,6 +276,7 @@ export default {
this.init();
},
methods: {
formatDateTimeByType,
init() {
this.getTableList();
},
......@@ -271,6 +299,29 @@ export default {
// 实物礼品列表
getTableList() {
console.log('获取列表详情');
let params = {
giftType: '1',
startTime: '',
startStock: '',
startCostPrice: '',
sortOrder: '',
sortColumn: '',
pageSize: '',
pageNum: '',
hiddenFlag: '',
giftNo: '',
giftName: '',
giftId: '',
giftBarNo: '',
endTime: '',
endStock: '',
endCostPrice: ''
};
giftPage(params).then(res =>{
console.log(res);
this.tableData = res.result;
console.log(this.tableData);
});
},
// 排序
sortChange(value) {
......@@ -350,12 +401,14 @@ export default {
updateStock(item) {
// this.stockData.id = item.goodsId;
this.stockData.remainedStock = item.remainedStock;
this.stockData.textarea = item.textarea;
console.log(this.stockData.remainedStock);
this.StockDialog = true;
},
closeUpdateStock() {
// this.stockData.id = '';
this.stockData.remainedStock = '';
this.stockData.textarea = '';
this.StockDialog = false;
},
// 虚拟礼品库存调整
......@@ -394,6 +447,7 @@ export default {
console.log('修改成本', item);
this.updateCostData.id = item.giftId;
this.updateCostData.costPrice = item.costPrice;
this.updateCostData.textarea = item.textarea;
this.updateCostDialog = true;
},
closeUpdateCost() {
......@@ -402,9 +456,12 @@ export default {
this.integralDate.costPrice = '';
this.updateCostDialog = false;
},
// add() {
// console.log('新建礼品,跳转')
// },
add() {
console.log('新建礼品,跳转');
this.$router.push({ path: '/gift-manage/virtual-gift-detail', query: { giftId: '' } });
// this.$router.push({ path: '/real-gift-detail' });
// http://git.gicdev.com/dm4/welfare.git
},
// edit(item) {
// console.log('编辑实物礼品', item);
// let giftObj = {
......@@ -467,14 +524,13 @@ export default {
.goods-descript {
color: #606266;
line-height: 18px;
height: 36px;
font-size: 14px;
margin-bottom: 10px;
}
.goods-code {
color: #909399;
font-size: 12px;
line-height: 17px;
margin-top: 5px;
line-height: 16px;
}
}
& :hover .el-icon-edit-outline {
......
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