Commit 6ddc0466 by damodmg

Merge branch 'dev' into 'master'

Dev

See merge request !27
parents e5e22566 52256a12
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.91dcdfa4ee238f85002fe41a912e6ab3.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.e11e478ed5709820b61b.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.58522a9479facd72cfe56ad539b8a081.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.e65945b6f038ce8c7bd5.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,7 +7,7 @@
<span style="display:none">{{ refash }}</span>
<el-dropdown trigger="click" placement="bottom-start" @command="i => getSelected(i, item)">
<el-input v-model="item.standardName" style="width:140px" size="smalll" placeholder="请选择" @input="value => spliceStandard(value, item)" @focus="getStdList(item)" @blur="addStandard(item)"></el-input>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown" style="height:300px;overflow-y:auto;min-width:200px;">
<el-dropdown-item style="width:140px" :command="i" v-for="i in standardList" :key="i.standardId">{{ i.standardName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -22,7 +22,7 @@
<div class="value-item" v-for="(v, n) in item.valueList" :key="n">
<el-dropdown trigger="click" placement="bottom-start" @command="i => getSelectedValue(i, item, n)">
<el-input v-model="v.valueName" style="width:140px" size="smalll" placeholder="请选择" @input="value => spliceStandardValue(value, item)" @focus="getStdValueList(item)" @blur="addStandardValue(item, n)"></el-input>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown" style="height:300px;overflow-y:auto;min-width:200px;">
<el-dropdown-item style="width:140px" :command="m" v-for="m in standardValueList" :key="m.valueId">{{ m.valueName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -71,16 +71,22 @@
<th style="width:120px"><span class="red-color">*</span>库存</th>
<th style="width:120px">规格编码</th>
<th style="width:120px">礼品条形码</th>
<!-- <th style="width:120px;display:none"></th> -->
</tr>
</thead>
<tbody>
<tr v-for="(item1, index1) in skuList" :key="index1">
<td v-for="(item2, index2) in item1" :key="index2" style="width:120px">
<span v-if="item1.length - index2 < 6">
<td v-for="(item2, index2) in item1" :key="index2" style="width:120px" v-if="item1.length - index2 > 1">
<!-- {{ item1[7] }} -->
<span v-if="item1.length - index2 < 7">
<el-input size="small" v-model="item2.valueName" @blur="skuInput(item1, item2, index1, index2)" @input="setSkuValueName"> </el-input>
</span>
<!-- <span v-else-if="item1.length === index2 + 1" style="color:red">{{ item2.valueName ? item2.valueName : '' }}</span> -->
<span v-else>{{ item2.valueName ? item2.valueName : '' }}</span>
</td>
<!-- 最后一列存的skuId -->
<td v-else style="color:red;display:none">{{ item2.valueName }}</td>
</tr>
</tbody>
</table>
......@@ -341,10 +347,15 @@ export default {
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
} else {
list = [];
}
this.skuList = copy(this.combine(copy(list)));
},
// 表格里面的图片上传成功
......@@ -500,19 +511,19 @@ export default {
for (let i in this.skuList) {
let length = this.skuList[i].length;
if (this.intergral) {
this.skuList[i][length - 5].valueName = this.intergral;
this.skuList[i][length - 6].valueName = this.intergral;
}
if (this.cash) {
this.skuList[i][length - 4].valueName = this.cash;
this.skuList[i][length - 5].valueName = this.cash;
}
if (this.stock) {
this.skuList[i][length - 3].valueName = this.stock;
this.skuList[i][length - 4].valueName = this.stock;
}
if (this.code) {
this.skuList[i][length - 2].valueName = this.code;
this.skuList[i][length - 3].valueName = this.code;
}
if (this.barCode) {
this.skuList[i][length - 1].valueName = this.barCode;
this.skuList[i][length - 2].valueName = this.barCode;
}
}
this.$emit('getSkuList', this.skuList);
......@@ -520,7 +531,7 @@ export default {
},
skuInput(item1, item2, index1, index2) {
let reg = /^[0-9a-zA-Z]+?$/;
if (item1.length - index2 === 5) {
if (item1.length - index2 === 6) {
//积分
//价格
if (Number(item2.valueName < 0)) {
......@@ -537,7 +548,7 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
} else if (item1.length - index2 === 4) {
} else if (item1.length - index2 === 5) {
//现金
if (Number(item2.valueName < 0)) {
this.$message.error('请输入大于0的数字');
......@@ -553,7 +564,7 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(2);
}
} else if (item1.length - index2 === 3) {
} else if (item1.length - index2 === 4) {
//库存
if (Number(item2.valueName < 0)) {
this.$message.error('请输入大于0的数字');
......@@ -567,14 +578,14 @@ export default {
} else {
item2.valueName = Number(item2.valueName).toFixed(0);
}
} else if (item1.length - index2 === 2) {
} else if (item1.length - index2 === 3) {
//规格编码
if (!reg.test(item2.valueName)) {
this.$message.error('请输入数字或者字母');
item2.valueName = '';
}
item2.valueName = item2.valueName.slice(0, 32);
} else if (item1.length - index2 === 1) {
} else if (item1.length - index2 === 2) {
//商品条形码
if (!reg.test(item2.valueName)) {
this.$message.error('请输入数字或者字母');
......
......@@ -616,6 +616,9 @@ export default {
tem.push({
valueName: res.data.result.skuJsonList[i].giftProGiftCode //条形码
});
tem.push({
valueName: res.data.result.skuJsonList[i].giftProSkuId //skuId
});
this.skuList.push(tem);
}
}
......@@ -939,7 +942,7 @@ export default {
for (let i in skuArr) {
//先获取sku价格条码这些
outArr = copy(skuArr[i]); //得到固定的数据
outArr1 = outArr.splice(outArr.length - 5, 5);
outArr1 = outArr.splice(outArr.length - 6, 6);
for (let k in outArr) {
outArr[k].proName = this.skuHeaderList[k].propName;
outArr[k].proId = this.skuHeaderList[k].propId;
......@@ -948,11 +951,14 @@ export default {
skuPrice.push(outArr1);
}
}
// return false;
this.submitSkuJson = [];
if (skuArr[0].length) {
for (let j in skuArr) {
//数据的个数
this.submitSkuJson.push({
giftProSkuId: skuPrice[j][5].valueName ? skuPrice[j][5].valueName : '',
giftProSkuIntegral: skuPrice[j][0].valueName, //积分
giftProSkuCash: skuPrice[j][1].valueName, //现金
stock: skuPrice[j][2].valueName, //库存
......
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