Commit d3da6151 by 萱草

update: bug修复

parent ecb431ca
.step-text[data-v-7dbe4afe]{color:#000;font-size:14px}.dash-style[data-v-7dbe4afe]{border-bottom:1px dashed #2f54eb}.upload-btn[data-v-7dbe4afe]{height:40px;border:1px dashed #c0c4cc;display:inline-block;font-size:14px;color:#c0c4cc;cursor:pointer;margin-right:10px;width:250px;border-radius:4px}.upload-btn .el-icon-upload2[data-v-7dbe4afe]{font-size:18px;color:#c0c4cc}.upload-btn[data-v-7dbe4afe]:hover{border-color:#1890ff}.upload-ele .el-button[data-v-7dbe4afe]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-7dbe4afe]{padding:0}.w-630[data-v-7dbe4afe]{width:630px}.mb56[data-v-7dbe4afe]{margin-bottom:56px}.from-content[data-v-7dbe4afe]{position:relative}.from-content .demo-ruleForm .form-section[data-v-7dbe4afe]{padding:30px 20px}.from-content .demo-ruleForm .form-section h3[data-v-7dbe4afe]{color:#303133;font-size:14px;font-weight:700;margin-bottom:31px;margin-left:20px;padding-bottom:9px;border-bottom:1px solid #dfdfdf}.from-content .demo-ruleForm .form-section h3[data-v-7dbe4afe]:before{clear:both;content:"";display:inline-block;overflow:hidden;width:3px;height:12px;line-height:14px;margin-right:8px;background:#2f54eb}.from-content .demo-ruleForm .form-section .tip-warm[data-v-7dbe4afe]{color:#909399;font-size:12px}.from-content .demo-ruleForm .form-section .tip-warm i[data-v-7dbe4afe]{color:#faad14;margin-right:5px}.from-content .demo-ruleForm .fixed-btn[data-v-7dbe4afe]{width:100%;height:56px;position:fixed;bottom:0;left:200px;background:#fff;border-top:1px solid #e4e7ed;text-align:center;margin-left:-100px;z-index:2;font-size:0}.from-content .demo-ruleForm .fixed-btn .el-button[data-v-7dbe4afe]{margin-top:12px}.from-content .anchor-link[data-v-7dbe4afe]{width:120px;position:fixed;right:24px;top:180px;background:#fff}.from-content .anchor-link .link-item[data-v-7dbe4afe]{height:24px;line-height:24px;color:#606266;font-size:12px;border-left:2px solid #ebeef5;padding-left:18px;cursor:pointer}.from-content .see-btn[data-v-7dbe4afe]{color:#909399;margin-left:15px}.from-content .see-btn[data-v-7dbe4afe]:hover{color:#2f54ed}.ml20[data-v-7dbe4afe]{margin-left:20px}.mr10[data-v-7dbe4afe]{margin-right:10px}.tips-content[data-v-7dbe4afe]{position:absolute;left:-4px;top:6px}.store-tips[data-v-7dbe4afe]{width:200px;position:absolute;left:-10px}.underline[data-v-7dbe4afe]{text-decoration:underline}.pickup-upload[data-v-7dbe4afe]{display:inline-block;vertical-align:top;margin-left:10px}.pickup-upload .upload-trigger[data-v-7dbe4afe]{border-style:dashed}.pickup-upload .upload-trigger .upload-icon[data-v-7dbe4afe]{font-size:14px}.pickup-upload .pickup-list[data-v-7dbe4afe]{margin-top:18px}.pickup-upload .pickup-list .pickup-list-name[data-v-7dbe4afe]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-7dbe4afe]{font-size:14px}.right-border{border-right:1px solid #ebeef5}.step-style .el-step.is-vertical .el-step__line{top:30px;left:8px;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.step-style .el-step__head.is-finish{color:#2f54eb;border-color:#2f54eb}.step-style .el-step__icon.is-text{border:1px solid}.step-style .el-step__icon{width:16px;height:16px}.step-style .el-step__icon-inner{font-size:12px}
\ No newline at end of file
.hidden-limit .dm-input__counter{display:none}.popver-button .el-button:not(.el-button--text){min-width:50px}.right-border{border-right:1px solid #ebeef5}.w360[data-v-357df7d2]{width:360px}.w-160[data-v-357df7d2]{width:160px}.w140[data-v-357df7d2]{width:140px}.w350[data-v-357df7d2]{width:350px}.tab-top[data-v-357df7d2]{height:32px;margin:20px 20px 0 20px}.tab-top .fl[data-v-357df7d2],.tab-top[data-v-357df7d2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.table-content[data-v-357df7d2]{margin:20px;padding-bottom:20px}.table-content .img-text[data-v-357df7d2]{height:60px}.table-content .img-text img[data-v-357df7d2]{width:60px;height:60px;border:1px solid #dcdfe6;padding:4px;border-radius:2px}.table-content .img-text .text[data-v-357df7d2]{display:inline-block;vertical-align:top;width:75%;height:60px;margin-left:3px;font-size:13px;line-height:14px;position:relative}.table-content .img-text .text .goods-descript[data-v-357df7d2]{display:-webkit-box;display:-ms-flexbox;display:flex;color:#606266;line-height:18px;font-size:14px}.table-content .img-text .text .goods-code[data-v-357df7d2]{color:#909399;font-size:12px;line-height:16px;margin-bottom:2px;position:absolute;bottom:2px}.table-content .img-text .el-icon-edit-outline[data-v-357df7d2]{display:none;cursor:pointer}.table-content .img-text :hover .el-icon-edit-outline[data-v-357df7d2]{display:inline-block;cursor:pointer}.table-content .img-text .el-icon-edit-outline[data-v-357df7d2]:hover{color:#2f54ed}.table-content .stock-box .el-icon-edit-outline[data-v-357df7d2]{display:none;cursor:pointer}.table-content .stock-box:hover .el-icon-edit-outline[data-v-357df7d2]{display:inline-block;cursor:pointer}.el-icon-edit-outline[data-v-357df7d2]:hover{color:#2f54ed}.undeline-dash[data-v-357df7d2]{border-bottom:1px dashed #2f54eb;font-weight:500}.spanclass[data-v-357df7d2]{display:inline-block;line-height:32px}.hidden-data[data-v-357df7d2]{max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.stock-box .el-tooltip__popper{width:150px}
\ No newline at end of file
.hidden-limit .dm-input__counter{display:none}.popver-button .el-button:not(.el-button--text){min-width:50px}.right-border{border-right:1px solid #ebeef5}.w360[data-v-b60ae704]{width:360px}.w-160[data-v-b60ae704]{width:160px}.w140[data-v-b60ae704]{width:140px}.w350[data-v-b60ae704]{width:350px}.tab-top[data-v-b60ae704]{height:32px;margin:20px 20px 0 20px}.tab-top .fl[data-v-b60ae704],.tab-top[data-v-b60ae704]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.table-content[data-v-b60ae704]{margin:20px;padding-bottom:20px}.table-content .img-text[data-v-b60ae704]{height:60px}.table-content .img-text img[data-v-b60ae704]{width:60px;height:60px;border:1px solid #dcdfe6;padding:4px;border-radius:2px}.table-content .img-text .text[data-v-b60ae704]{display:inline-block;vertical-align:top;width:75%;height:60px;margin-left:3px;font-size:13px;line-height:14px;position:relative}.table-content .img-text .text .goods-descript[data-v-b60ae704]{display:-webkit-box;display:-ms-flexbox;display:flex;color:#606266;line-height:18px;font-size:14px}.table-content .img-text .text .goods-code[data-v-b60ae704]{color:#909399;font-size:12px;line-height:16px;margin-bottom:2px;position:absolute;bottom:2px}.table-content .img-text .el-icon-edit-outline[data-v-b60ae704]{display:none;cursor:pointer}.table-content .img-text :hover .el-icon-edit-outline[data-v-b60ae704]{display:inline-block;cursor:pointer}.table-content .img-text .el-icon-edit-outline[data-v-b60ae704]:hover{color:#2f54ed}.table-content .stock-box .el-icon-edit-outline[data-v-b60ae704]{display:none;cursor:pointer}.table-content .stock-box:hover .el-icon-edit-outline[data-v-b60ae704]{display:inline-block;cursor:pointer}.el-icon-edit-outline[data-v-b60ae704]:hover{color:#2f54ed}.undeline-dash[data-v-b60ae704]{border-bottom:1px dashed #2f54eb;font-weight:500}.spanclass[data-v-b60ae704]{display:inline-block;line-height:32px}.hidden-data[data-v-b60ae704]{max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.stock-box .el-tooltip__popper{width:150px}
\ No newline at end of file
.right-border{border-right:1px solid #ebeef5}.hidden-limit .dm-input__counter{display:none}.popver-button .el-button:not(.el-button--text){min-width:50px}.file-style:hover .upload-trigger[data-v-4f27e20e]{border-color:#1890ff}.upload-ele .el-button[data-v-4f27e20e]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-4f27e20e]{padding:0}.uploadText p[data-v-4f27e20e]{line-height:26px}.pickup-upload[data-v-4f27e20e]{display:inline-block;vertical-align:top}.pickup-upload .upload-trigger[data-v-4f27e20e]{border-style:dashed;margin-right:10px}.pickup-upload .upload-trigger .upload-icon[data-v-4f27e20e]{font-size:14px}.pickup-upload .pickup-list[data-v-4f27e20e]{margin-top:18px}.pickup-upload .pickup-list .pickup-list-name[data-v-4f27e20e]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-4f27e20e]{font-size:14px}.w360[data-v-0fc9b23f]{width:360px}.w-160[data-v-0fc9b23f]{width:160px}.w140[data-v-0fc9b23f]{width:140px}.w350[data-v-0fc9b23f]{width:350px}.tab-top[data-v-0fc9b23f]{height:32px;margin:20px 20px 0 20px}.tab-top .fl[data-v-0fc9b23f],.tab-top[data-v-0fc9b23f]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.table-content[data-v-0fc9b23f]{margin:20px;padding-bottom:20px}.table-content .img-text[data-v-0fc9b23f]{height:60px}.table-content .img-text img[data-v-0fc9b23f]{width:60px;height:60px;border:1px solid #dcdfe6;padding:4px;border-radius:2px}.table-content .img-text .text[data-v-0fc9b23f]{display:inline-block;vertical-align:top;width:75%;height:60px;margin-left:3px;font-size:13px;line-height:14px;position:relative}.table-content .img-text .text .goods-descript[data-v-0fc9b23f]{display:-webkit-box;display:-ms-flexbox;display:flex;color:#606266;line-height:18px;font-size:14px}.table-content .img-text .text .goods-code[data-v-0fc9b23f]{color:#909399;font-size:12px;line-height:16px;margin-bottom:2px;position:absolute;bottom:2px}.table-content .img-text .el-icon-edit-outline[data-v-0fc9b23f]{display:none;cursor:pointer}.table-content .img-text :hover .el-icon-edit-outline[data-v-0fc9b23f]{display:inline-block;cursor:pointer}.table-content .img-text .el-icon-edit-outline[data-v-0fc9b23f]:hover{color:#2f54ed}.table-content .stock-box .el-icon-edit-outline[data-v-0fc9b23f]{display:none;cursor:pointer}.table-content .stock-box:hover .el-icon-edit-outline[data-v-0fc9b23f]{display:inline-block;cursor:pointer}.el-icon-edit-outline[data-v-0fc9b23f]:hover{color:#2f54ed}.undeline-dash[data-v-0fc9b23f]{border-bottom:1px dashed #2f54eb;font-weight:500}.spanclass[data-v-0fc9b23f]{display:inline-block;line-height:32px}.hidden-data[data-v-0fc9b23f]{max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.stock-box .el-tooltip__popper{width:150px}
\ No newline at end of file
.step-text[data-v-b6d548a4]{color:#000;font-size:14px}.dash-style[data-v-b6d548a4]{border-bottom:1px dashed #2f54eb}.upload-btn[data-v-b6d548a4]{height:40px;border:1px dashed #c0c4cc;display:inline-block;font-size:14px;color:#c0c4cc;cursor:pointer;margin-right:10px;width:250px;border-radius:4px}.upload-btn .el-icon-upload2[data-v-b6d548a4]{font-size:18px;color:#c0c4cc}.upload-btn[data-v-b6d548a4]:hover{border-color:#1890ff}.upload-ele .el-button[data-v-b6d548a4]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-b6d548a4]{padding:0}.w-630[data-v-b6d548a4]{width:630px}.mb56[data-v-b6d548a4]{margin-bottom:56px}.from-content[data-v-b6d548a4]{position:relative}.from-content .demo-ruleForm .form-section[data-v-b6d548a4]{padding:30px 20px}.from-content .demo-ruleForm .form-section h3[data-v-b6d548a4]{color:#303133;font-size:14px;font-weight:700;margin-bottom:31px;margin-left:20px;padding-bottom:9px;border-bottom:1px solid #dfdfdf}.from-content .demo-ruleForm .form-section h3[data-v-b6d548a4]:before{clear:both;content:"";display:inline-block;overflow:hidden;width:3px;height:12px;line-height:14px;margin-right:8px;background:#2f54eb}.from-content .demo-ruleForm .form-section .tip-warm[data-v-b6d548a4]{color:#909399;font-size:12px}.from-content .demo-ruleForm .form-section .tip-warm i[data-v-b6d548a4]{color:#faad14;margin-right:5px}.from-content .demo-ruleForm .fixed-btn[data-v-b6d548a4]{width:100%;height:56px;position:fixed;bottom:0;left:200px;background:#fff;border-top:1px solid #e4e7ed;text-align:center;margin-left:-100px;z-index:2;font-size:0}.from-content .demo-ruleForm .fixed-btn .el-button[data-v-b6d548a4]{margin-top:12px}.from-content .anchor-link[data-v-b6d548a4]{width:120px;position:fixed;right:24px;top:180px;background:#fff}.from-content .anchor-link .link-item[data-v-b6d548a4]{height:24px;line-height:24px;color:#606266;font-size:12px;border-left:2px solid #ebeef5;padding-left:18px;cursor:pointer}.from-content .see-btn[data-v-b6d548a4]{color:#909399;margin-left:15px}.from-content .see-btn[data-v-b6d548a4]:hover{color:#2f54ed}.ml20[data-v-b6d548a4]{margin-left:20px}.mr10[data-v-b6d548a4]{margin-right:10px}.tips-content[data-v-b6d548a4]{position:absolute;left:-4px;top:6px}.store-tips[data-v-b6d548a4]{width:200px;position:absolute;left:-10px}.underline[data-v-b6d548a4]{text-decoration:underline}.pickup-upload[data-v-b6d548a4]{display:inline-block;vertical-align:top;margin-left:10px}.pickup-upload .upload-trigger[data-v-b6d548a4]{border-style:dashed}.pickup-upload .upload-trigger .upload-icon[data-v-b6d548a4]{font-size:14px}.pickup-upload .pickup-list[data-v-b6d548a4]{margin-top:18px}.pickup-upload .pickup-list .pickup-list-name[data-v-b6d548a4]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-b6d548a4]{font-size:14px}.right-border{border-right:1px solid #ebeef5}.step-style .el-step.is-vertical .el-step__line{top:30px;left:8px;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.step-style .el-step__head.is-finish{color:#2f54eb;border-color:#2f54eb}.step-style .el-step__icon.is-text{border:1px solid}.step-style .el-step__icon{width:16px;height:16px}.step-style .el-step__icon-inner{font-size:12px}
\ No newline at end of file
.right-border{border-right:1px solid #ebeef5}.hidden-limit .dm-input__counter{display:none}.popver-button .el-button:not(.el-button--text){min-width:50px}.file-style:hover .upload-trigger[data-v-4f27e20e]{border-color:#1890ff}.upload-ele .el-button[data-v-4f27e20e]{border:none;color:#c0c4cc}.upload-ele .el-button--small[data-v-4f27e20e]{padding:0}.uploadText p[data-v-4f27e20e]{line-height:26px}.pickup-upload[data-v-4f27e20e]{display:inline-block;vertical-align:top}.pickup-upload .upload-trigger[data-v-4f27e20e]{border-style:dashed;margin-right:10px}.pickup-upload .upload-trigger .upload-icon[data-v-4f27e20e]{font-size:14px}.pickup-upload .pickup-list[data-v-4f27e20e]{margin-top:18px}.pickup-upload .pickup-list .pickup-list-name[data-v-4f27e20e]{font-size:14px;font-weight:400;color:#303133;line-height:20px}.pickup-upload .pickup-list .pickup-list-name .file-icon[data-v-4f27e20e]{font-size:14px}.w360[data-v-517b8a46]{width:360px}.w-160[data-v-517b8a46]{width:160px}.w140[data-v-517b8a46]{width:140px}.w350[data-v-517b8a46]{width:350px}.tab-top[data-v-517b8a46]{height:32px;margin:20px 20px 0 20px}.tab-top .fl[data-v-517b8a46],.tab-top[data-v-517b8a46]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.table-content[data-v-517b8a46]{margin:20px;padding-bottom:20px}.table-content .img-text[data-v-517b8a46]{height:60px}.table-content .img-text img[data-v-517b8a46]{width:60px;height:60px;border:1px solid #dcdfe6;padding:4px;border-radius:2px}.table-content .img-text .text[data-v-517b8a46]{display:inline-block;vertical-align:top;width:75%;height:60px;margin-left:3px;font-size:13px;line-height:14px;position:relative}.table-content .img-text .text .goods-descript[data-v-517b8a46]{display:-webkit-box;display:-ms-flexbox;display:flex;color:#606266;line-height:18px;font-size:14px}.table-content .img-text .text .goods-code[data-v-517b8a46]{color:#909399;font-size:12px;line-height:16px;margin-bottom:2px;position:absolute;bottom:2px}.table-content .img-text .el-icon-edit-outline[data-v-517b8a46]{display:none;cursor:pointer}.table-content .img-text :hover .el-icon-edit-outline[data-v-517b8a46]{display:inline-block;cursor:pointer}.table-content .img-text .el-icon-edit-outline[data-v-517b8a46]:hover{color:#2f54ed}.table-content .stock-box .el-icon-edit-outline[data-v-517b8a46]{display:none;cursor:pointer}.table-content .stock-box:hover .el-icon-edit-outline[data-v-517b8a46]{display:inline-block;cursor:pointer}.el-icon-edit-outline[data-v-517b8a46]:hover{color:#2f54ed}.undeline-dash[data-v-517b8a46]{border-bottom:1px dashed #2f54eb;font-weight:500}.spanclass[data-v-517b8a46]{display:inline-block;line-height:32px}.hidden-data[data-v-517b8a46]{max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.stock-box .el-tooltip__popper{width:150px}
\ 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.
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.
......@@ -345,9 +345,9 @@ export default {
this.banthStock = undefined;
},
changeSingleStock(id, stock, stockType){
if(!stock){
this.$message.error('请完善库存');
}
// if(!stock){
// this.$message.error('请完善库存');
// }
if(this.updateList.length > 0){
let iii;
let result = this.updateList.some((item, index) =>{
......
......@@ -180,8 +180,8 @@
</div>
</div>
</el-form-item>
<el-form-item label="成本" class="w-630" prop="costPrice">
<dm-input-amount v-model="goodsForm.costPrice" width="180" :min="0" :max="999999.99" :precision="2" :disabled="goodsStandardInfo.length > 0"></dm-input-amount>
<el-form-item label="成本" class="w-630" prop="costPrice" :rules="[{ validator: costPriceValide, trigger: 'blur' }]">
<dm-input-amount v-model="goodsForm.costPrice" width="180" @blur="costPriceValide(goodsForm.costPrice)" :min="0" :max="999999.99" :precision="2" :disabled="goodsStandardInfo.length > 0"></dm-input-amount>
</el-form-item>
<el-form-item label="可占用库存" class="w-630" prop="stock">
<dm-input-number v-model="goodsForm.stock" width="180" :min="0" :max="999999" :precision="0" :disabled="goodsStandardInfo.length > 0"></dm-input-number>
......@@ -292,6 +292,14 @@ export default {
selectPickupStore,
},
data() {
let costPriceValide = (rule, value, callback) =>{
if(value){
const regExp = /[\u4e00-\u9fa5]/g;
if(regExp.test(value)) {
return callback(new Error('成本只能是数字'));
}
}
};
let validateGoodsCode = (rule, value, callback) => {
if (value) {
if(value.split('').length > 32){
......@@ -385,6 +393,7 @@ export default {
},
validateGoodsCode,
validateGoodsBarCode,
costPriceValide,
// 规格信息
goodsStandardInfo: [],
standardList: [], // 当前操作的规格列表
......@@ -997,6 +1006,11 @@ export default {
this.handleSpuStock();
},
handleCostPrice(){
const regExp = /[\u4e00-\u9fa5]/g;
if(regExp.test(this.handleData.giftSkuCostPrice)) {
this.handleData.giftSkuCostPrice = '';
this.$message.error('成本只能是数字');
}
console.log(this.handleData.giftSkuCostPrice);
for (let item in this.skuSellObj) {
console.log(this.skuSellObj[item].giftSkuId);
......@@ -1248,6 +1262,13 @@ export default {
},
// 成本价
handleValidIntegral(value, key, num) {
if(value){
const regExp = /[\u4e00-\u9fa5]/g;
if(regExp.test(value)) {
this.skuSellObj[key].giftSkuCostPrice = '';
this.$message.error('成本只能是数字');
}
}
if (!value && value !== 0) {
this.skuSellObj[key].giftSkuCostPriceStatus = false;
this.$message.error('成本价是必填项');
......
......@@ -5,7 +5,7 @@
<div>
<div class="tab-top">
<div class="fl">
<el-input :placeholder="placeholderText" v-model="query.key" class="mr10 w360" clearable @keyup.enter.native="getSearchList" @clear="getSearchList2">
<el-input :placeholder="placeholderText" v-model="query.key" class="mr10 w360" clearable @change="getSearchList" @clear="getSearchList2">
<el-select v-model="query.type" slot="prepend" placeholder="礼品名称" style="width:140px;" @change="handleChangeType">
<el-option label="礼品名称" :value="1"></el-option>
<el-option label="礼品编码" :value="2"></el-option>
......@@ -21,7 +21,8 @@
<el-button v-if="unfoldStatus" type="text" @click="handleUnfold" >收起<i class="el-icon-arrow-up"></i></el-button>
</div>
<div class="fr">
<el-select v-model="batchOperate" placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch">
<!-- <el-select v-model="batchOperate" placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch"> -->
<el-select placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch">
<el-option label="批量隐藏" :value="0"></el-option>
<el-option label="批量取消隐藏" :value="1"></el-option>
<el-option label="批量禁用" :value="2"></el-option>
......@@ -286,6 +287,7 @@ export default {
this.query.type = 1;
this.query.currentPage = 1;
this.getTableList();
this.handleChangeType();
},
// 列表筛选条件更改
handleChangeType() {
......
......@@ -22,7 +22,7 @@
</div>
<div class="form-section">
<h3>库存信息</h3>
<el-form-item label="成本" class="w-630" prop="virCostPrice">
<el-form-item label="成本" class="w-630" prop="virCostPrice" :rules="[{ validator: costPriceValide, trigger: 'blur' }]">
<dm-input-amount v-model="goodsForm.virCostPrice" width="180" :min="0" :max="999999.99" :precision="2"></dm-input-amount>
</el-form-item>
<el-form-item label="库存" class="w-630" prop="stock">
......@@ -176,6 +176,14 @@ export default {
checkUploadDetail,
},
data() {
let costPriceValide = (rule, value, callback) =>{
if(value){
const regExp = /[\u4e00-\u9fa5]/g;
if(regExp.test(value)) {
return callback(new Error('成本只能是数字'));
}
}
};
let validateGoodsCode = (rule, value, callback) => {
if (value) {
if(value.split('').length > 32){
......@@ -259,6 +267,7 @@ export default {
},
validateGoodsCode,
validateGoodsBarCode,
costPriceValide,
giftId: '',
editorWidth: 900,
// 图片墙数据
......
......@@ -5,7 +5,7 @@
<div>
<div class="tab-top">
<div class="fl">
<el-input :placeholder="placeholderText" v-model="query.key" class="mr10 w360" clearable @keyup.enter.native="getSearchList" @clear="getSearchList2">
<el-input :placeholder="placeholderText" v-model="query.key" class="mr10 w360" clearable @change="getSearchList" @clear="getSearchList2">
<el-select v-model="query.type" slot="prepend" placeholder="礼品名称" style="width:140px;" @change="handleChangeType">
<el-option label="礼品名称" :value="1"></el-option>
<el-option label="礼品编码" :value="2"></el-option>
......@@ -21,7 +21,8 @@
<el-button v-if="unfoldStatus" type="text" @click="handleUnfold" >收起<i class="el-icon-arrow-up"></i></el-button>
</div>
<div class="fr">
<el-select v-model="batchOperate" placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch">
<!-- <el-select v-model="batchOperate" placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch"> -->
<el-select placeholder="批量操作" class="w-160 mr10 more-select" :disabled="selectList.length < 1" @change="handleBatch">
<el-option label="批量隐藏" :value="0"></el-option>
<el-option label="批量取消隐藏" :value="1"></el-option>
<el-option label="批量禁用" :value="2"></el-option>
......@@ -314,6 +315,7 @@ export default {
this.query.type = 1;
this.query.currentPage = 1;
this.getTableList();
this.handleChangeType();
},
// 列表筛选条件更改
handleChangeType() {
......
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