Skip to content

Instantly share code, notes, and snippets.

@icai
Created January 11, 2018 12:19
Show Gist options
  • Save icai/7f621d44295fe83fc0c9f43af4dd6d15 to your computer and use it in GitHub Desktop.
Save icai/7f621d44295fe83fc0c9f43af4dd6d15 to your computer and use it in GitHub Desktop.
vue render vm code
(function() {
with (this) {
return _c('div', {
staticClass: "ui-abox",
attrs: {
"fitBottom": "true"
}
}, [_c('div', {
staticClass: "fixed-btns"
}, [_c('BackTop', {
staticStyle: {
"position": "static"
},
attrs: {
"height": 100
}
}, [_c('button', {
staticClass: "ivu-back-top-inner"
}, [_c('Icon', {
attrs: {
"type": "chevron-up"
}
})], 1)]), _v(" "), _c('i-button', {
attrs: {
"type": "info"
},
on: {
"click": function($event) {
tutorialModal = true
}
}
}, [_v("教程")]), _v(" "), _c('i-button', {
attrs: {
"type": "error"
},
on: {
"click": function($event) {
CloseWindow('close')
}
}
}, [_v("退出")]), _v(" "), (auth('编辑商品')) ? [_c('i-button', {
attrs: {
"type": "primary"
},
on: {
"click": saveData
}
}, [_c('span', [_v("发布")])])] : _e()], 2), _v(" "), _c('div', {
staticClass: "ui-toolbar ui-detail-toolbar",
staticStyle: {
"display": "none"
}
}, [_c('span', {
staticClass: "win-title"
}, [_v("商品发布")]), _v(" "), _c('div', {
staticClass: "pull-right"
}, [(auth('编辑商品')) ? [_c('a', {
staticClass: "mini-button",
attrs: {
"iconcls": "icon-save",
"onclick": "saveData()",
"plain": "true"
}
}, [_v("保存")])] : _e(), _v(" "), _c('a', {
staticClass: "mini-button",
attrs: {
"iconcls": "icon-exit",
"onclick": "CloseWindow('close')",
"plain": "true"
}
}, [_v("退出")])], 2)]), _v(" "), _c('div', {
staticClass: "form mini-container",
attrs: {
"id": "mainform"
}
}, [_c('div', {
staticClass: "panel panel-simple"
}, [_m(0), _v(" "), _c('div', {
staticClass: "panel-body"
}, [(categoryData.show == false) ? _c('div', [_c('i-form', {
ref: "cateValidate",
attrs: {
"label-width": 112,
"model": categoryData,
"rules": ruleValidate
}
}, [_c('Row', {
attrs: {
"gutter": 16
}
}, [_c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "一级类目:",
"prop": "category1.select"
}
}, _l((categoryData.category1.option), function(item) {
return (categoryData.category1.select == item.id) ? _c('span', {
staticClass: "sblue"
}, [_v(_s(item.name))]) : _e()
}))], 1), _v(" "), _c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "二级类目:",
"prop": "category2.select"
}
}, _l((categoryData.category2.option), function(item) {
return (categoryData.category2.select == item.id) ? _c('span', {
staticClass: "sblue"
}, [_v(_s(item.name))]) : _e()
}))], 1), _v(" "), _c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "三级类目:",
"prop": "category3.select"
}
}, _l((categoryData.category3.option), function(item) {
return (categoryData.category3.select == item.id) ? _c('span', {
staticClass: "sblue"
}, [_v(_s(item.name))]) : _e()
}))], 1), _v(" "), (hasCategory == false) ? _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-button', {
attrs: {
"type": "primary",
"long": ""
},
on: {
"click": function($event) {
changeCategory(true)
}
}
}, [_v("修改类目")])], 1) : _e()], 1)], 1)], 1) : _c('div', [_c('i-form', {
ref: "cateValidate",
attrs: {
"label-width": 112,
"model": categoryData,
"rules": ruleValidate
}
}, [_c('Row', {
attrs: {
"gutter": 16
}
}, [_c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "一级类目:",
"prop": "category1.select"
}
}, [_c('i-select', {
attrs: {
"filterable": "",
"placeholder": "请选择一级类目"
},
on: {
"on-change": function($event) {
ajaxCategory(1, categoryData.category1.select)
}
},
model: {
value: (categoryData.category1.select),
callback: function($$v) {
$set(categoryData.category1, "select", $$v)
},
expression: "categoryData.category1.select"
}
}, _l((categoryData.category1.option), function(item) {
return _c('i-option', {
attrs: {
"value": item.id
}
}, [_v(_s(item.name))])
}))], 1)], 1), _v(" "), _c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "二级类目:",
"prop": "category2.select"
}
}, [_c('i-select', {
attrs: {
"filterable": "",
"placeholder": "请选择二级类目"
},
on: {
"on-change": function($event) {
ajaxCategory(2, categoryData.category2.select)
}
},
model: {
value: (categoryData.category2.select),
callback: function($$v) {
$set(categoryData.category2, "select", $$v)
},
expression: "categoryData.category2.select"
}
}, _l((categoryData.category2.option), function(item) {
return _c('i-option', {
attrs: {
"value": item.id
}
}, [_v(_s(item.name))])
}))], 1)], 1), _v(" "), _c('i-col', {
attrs: {
"span": "7"
}
}, [_c('Form-item', {
attrs: {
"label": "三级类目:",
"prop": "category3.select"
}
}, [_c('i-select', {
attrs: {
"filterable": "",
"placeholder": "请选择三级类目"
},
model: {
value: (categoryData.category3.select),
callback: function($$v) {
$set(categoryData.category3, "select", $$v)
},
expression: "categoryData.category3.select"
}
}, _l((categoryData.category3.option), function(item) {
return _c('i-option', {
attrs: {
"value": item.id
}
}, [_v(_s(item.name))])
}))], 1)], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-button', {
attrs: {
"type": "primary",
"long": ""
},
on: {
"click": function($event) {
changeCategory(false)
}
}
}, [_v("确定类目")])], 1)], 1)], 1)], 1)])]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_m(1), _v(" "), _c('div', {
staticClass: "panel-body"
}, [_c('i-form', {
ref: "infoValidate",
attrs: {
"label-width": 112,
"model": info,
"rules": ruleValidate
}
}, [_c('Row', {
attrs: {
"gutter": 16
}
}, [_c('i-col', {
attrs: {
"span": "24"
}
}, [_c('Form-item', {
attrs: {
"label": "商品名称:",
"prop": "name"
}
}, [_c('i-input', {
attrs: {
"placeholder": "商品名称(最多50字符)"
},
model: {
value: (info.name),
callback: function($$v) {
$set(info, "name", $$v)
},
expression: "info.name"
}
})], 1)], 1)], 1), _v(" "), _c('Row', {
attrs: {
"gutter": 16
}
}, [_c('i-col', {
attrs: {
"span": "12"
}
}, [_c('Form-item', {
attrs: {
"label": "关键词:",
"prop": "keywords"
}
}, [_c('i-input', {
attrs: {
"placeholder": "关键词"
},
model: {
value: (info.keywords),
callback: function($$v) {
$set(info, "keywords", $$v)
},
expression: "info.keywords"
}
})], 1)], 1), _v(" "), _c('i-col', {
attrs: {
"span": "12"
}
}, [_c('Form-item', {
attrs: {
"label": "国标码:",
"prop": "gbCode"
}
}, [_c('i-input', {
attrs: {
"placeholder": "国标码"
},
model: {
value: (info.gbCode),
callback: function($$v) {
$set(info, "gbCode", $$v)
},
expression: "info.gbCode"
}
})], 1)], 1)], 1)], 1)], 1)]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_m(2), _v(" "), _c('div', {
staticClass: "panel-body"
}, [(isInActivity) ? _c('div', {
staticClass: "pl-10 pb-10 co-red"
}, [_v("\n 当前商品在进行活动,不能修改计量单位\n ")]) : _e(), _v(" "), _c('i-form', {
ref: "unitValidate",
attrs: {
"model": cartonUnits.dataSource,
"rules": ruleValidate
}
}, [_c('Row', [_c('Col', {
attrs: {
"span": "6"
}
}, [_c('Form-item', {
attrs: {
"label-width": 112,
"label": "最小计量单位:",
"prop": "0",
"rules": cartrules
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "23"
}
}, [_c('input', {
directives: [{
name: "model",
rawName: "v-model",
value: (cartonUnits.dataSource[0].quantity),
expression: "cartonUnits.dataSource[0].quantity"
}],
attrs: {
"type": "hidden",
"value": "1"
},
domProps: {
"value": (cartonUnits.dataSource[0].quantity)
},
on: {
"input": function($event) {
if ($event.target.composing)
return;
$set(cartonUnits.dataSource[0], "quantity", $event.target.value)
}
}
}), _v(" "), _c('i-select', {
attrs: {
"filterable": "",
"disabled": isInActivity,
"placeholder": "请选择计量单位"
},
model: {
value: (cartonUnits.dataSource[0].name),
callback: function($$v) {
$set(cartonUnits.dataSource[0], "name", $$v)
},
expression: "cartonUnits.dataSource[0].name"
}
}, _l((units.data), function(item) {
return _c('i-option', {
attrs: {
"value": item.name
}
}, [_v(_s(item.name))])
}))], 1)], 1)], 1)], 1), _v(" "), _c('Col', {
attrs: {
"span": "16"
}
}, [_c('Form-item', {
attrs: {
"prop": "0",
"rules": cartrulesVolume
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"placeholder": "重量(g)"
},
model: {
value: (cartonUnits.dataSource[0].weight),
callback: function($$v) {
$set(cartonUnits.dataSource[0], "weight", $$v)
},
expression: "cartonUnits.dataSource[0].weight"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("重量(g)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "长(cm)"
},
model: {
value: (cartonUnits.dataSource[0].length),
callback: function($$v) {
$set(cartonUnits.dataSource[0], "length", $$v)
},
expression: "cartonUnits.dataSource[0].length"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("长(cm)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "宽(cm)"
},
model: {
value: (cartonUnits.dataSource[0].width),
callback: function($$v) {
$set(cartonUnits.dataSource[0], "width", $$v)
},
expression: "cartonUnits.dataSource[0].width"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("宽(cm)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "高(cm)"
},
model: {
value: (cartonUnits.dataSource[0].height),
callback: function($$v) {
$set(cartonUnits.dataSource[0], "height", $$v)
},
expression: "cartonUnits.dataSource[0].height"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("高(cm)")])])], 1)], 1)], 1)], 1)], 1), _v(" "), (unitsMultiple) ? [_c('Row', [_c('Col', {
attrs: {
"span": "6"
}
}, [_c('Form-item', {
attrs: {
"label-width": 112,
"label": "箱规单位:",
"prop": "1",
"rules": cartrules
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "23"
}
}, [_c('i-select', {
attrs: {
"disabled": isInActivity,
"filterable": "",
"placeholder": "请选择计量单位"
},
model: {
value: (cartonUnits.dataSource[1].name),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "name", $$v)
},
expression: "cartonUnits.dataSource[1].name"
}
}, _l((units.data), function(item) {
return _c('i-option', {
attrs: {
"value": item.name
}
}, [_v(_s(item.name))])
}))], 1)], 1)], 1)], 1), _v(" "), _c('Col', {
attrs: {
"span": "16"
}
}, [_c('Form-item', {
attrs: {
"prop": "1",
"rules": cartrulesVolume
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"placeholder": "重量(g)"
},
model: {
value: (cartonUnits.dataSource[1].weight),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "weight", $$v)
},
expression: "cartonUnits.dataSource[1].weight"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("重量(g)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "长(cm)"
},
model: {
value: (cartonUnits.dataSource[1].length),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "length", $$v)
},
expression: "cartonUnits.dataSource[1].length"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("长(cm)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "宽(cm)"
},
model: {
value: (cartonUnits.dataSource[1].width),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "width", $$v)
},
expression: "cartonUnits.dataSource[1].width"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("宽(cm)")])])], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"disabled": isInActivity,
"number": "",
"placeholder": "高(cm)"
},
model: {
value: (cartonUnits.dataSource[1].height),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "height", $$v)
},
expression: "cartonUnits.dataSource[1].height"
}
}, [_c('span', {
attrs: {
"slot": "prepend"
},
slot: "prepend"
}, [_v("高(cm)")])])], 1)], 1)], 1)], 1)], 1), _v(" "), _c('Form-item', {
attrs: {
"label-width": 112,
"label": "箱规数量:",
"prop": "1",
"rules": quantityrules
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "23"
}
}, [_c('i-input', {
staticStyle: {
"display": "inline-block",
"width": "100px"
},
attrs: {
"disabled": isInActivity,
"placeholder": "箱规数量"
},
model: {
value: (cartonUnits.dataSource[1].quantity),
callback: function($$v) {
$set(cartonUnits.dataSource[1], "quantity", $$v)
},
expression: "cartonUnits.dataSource[1].quantity"
}
}), _v("\n " + _s(cartonUnits.dataSource[0].name || '最小计量单位') + "\n  = \n 1 " + _s(cartonUnits.dataSource[1].name || '箱规单位') + "\n "), _c('span', {
staticClass: "ml-14"
}, [_v("提示: 箱规数量为箱规包含的最小单位商品数量(如:10件=1箱)")])], 1)], 1)], 1), _v(" "), _c('Form-item', {
attrs: {
"label-width": 200,
"label": "该商品在批发通APP的销售单位:"
}
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "23"
}
}, [_c('RadioGroup', {
on: {
"on-change": updateCartonUnits
},
model: {
value: (units.allowBuy),
callback: function($$v) {
$set(units, "allowBuy", $$v)
},
expression: "units.allowBuy"
}
}, _l((units.saleTypes), function(item, index) {
return _c('Radio', {
attrs: {
"label": item.id,
"disabled": isInActivity
}
}, [_c('span', [_v(_s(item.label))]), _v(" "), (cartonUnits.dataSource[index].name) ? _c('span', [_v("(" + _s(cartonUnits.dataSource[index].name) + ")")]) : _e()])
}))], 1)], 1), _v(" "), _c('span', {
staticClass: "fs-12",
staticStyle: {
"vertical-align": "top",
"color": "#999",
"margin-left": "-180px"
}
}, [_v("\n (说明:假设最小计量单位为件、箱规单位为箱,若勾选按最小计量单位销售,用户按件支付下单,如果勾选按箱规单位销售,则用户按箱支付下单,目前销售单位只支持二选一)\n ")])], 1)] : _e()], 2)], 1)]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_c('div', {
staticClass: "panel-heading"
}, [_c('h3', [_v("3.商品规格设置 "), _c('a', {
staticClass: "fs-14",
attrs: {
"href": "javascript:;"
},
on: {
"click": function($event) {
tutorialSkuOption = true
}
}
}, [_c('Icon', {
attrs: {
"type": "help-circled"
}
}), _v("帮助")], 1)])]), _v(" "), _c('div', {
ref: "skuPane",
staticClass: "panel-body"
}, [_l((skuOptions.dataSource), function(item, index) {
return (skuOptions.dataSource.length > 0) ? _c('div', {
staticClass: "attr-item mt-15"
}, [_c('h5', {
staticClass: "title"
}, [_v(_s(item.name) + ":"), _c('span')]), _v(" "), _c('div', {
staticClass: "content"
}, [(item.values.length > 0) ? _c('CheckboxGroup', {
on: {
"on-change": updateSkus
},
model: {
value: (skuOptions.data[item.name]),
callback: function($$v) {
$set(skuOptions.data, item.name, $$v)
},
expression: "skuOptions.data[item.name]"
}
}, _l((item.values), function(sku, i) {
return _c('Checkbox', {
attrs: {
"label": sku
}
})
})) : _e()], 1), _v(" "), _c('div', {
staticClass: "content mt-10"
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "4"
}
}, [_c('i-input', {
attrs: {
"placeholder": '新增自定义' + item.name
},
on: {
"on-enter": function($event) {
addSkuOptions(item)
}
},
model: {
value: (skuOptions.add[item.name]),
callback: function($$v) {
$set(skuOptions.add, item.name, $$v)
},
expression: "skuOptions.add[item.name]"
}
})], 1), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-button', {
attrs: {
"type": "primary"
},
on: {
"click": function($event) {
addSkuOptions(item)
}
}
}, [_v("添加商品规格")])], 1)], 1)], 1)]) : _e()
}), _v(" "), (skuOptions.dataSource.length > 0) ? _c('p', {
staticClass: "pt-10"
}, [_v("以上规格不满足需求?请点击 "), _c('a', {
attrs: {
"href": "javascript:;",
"title": ""
},
on: {
"click": function($event) {
addNewSkuOptions()
}
}
}, [_v("新增其他规格")])]) : _c('p', {
staticClass: "pt-10"
}, [_v("当前商品没有可带出的规格,请点击 "), _c('a', {
attrs: {
"href": "javascript:;",
"title": ""
},
on: {
"click": function($event) {
addNewSkuOptions()
}
}
}, [_v("新增其他规格")])]), _v(" "), _l((skuOptions.newgroup), function(item, index) {
return (skuOptions.newgroup.length > 0) ? _c('div', {
directives: [{
name: "show",
rawName: "v-show",
value: (!(skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0)),
expression: "!(skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0)"
}],
staticClass: "mb-15"
}, [_c('Row', {
attrs: {
"gutter": 5
}
}, [_c('i-col', {
attrs: {
"span": "2"
}
}, [_c('div', {
staticStyle: {
"line-height": "30px",
"text-align": "center"
}
}, [_c('a', {
staticClass: "ico fa fa-plus fs-20 mr-10",
on: {
"click": function($event) {
addCustomSku(item)
}
}
}), _v(" "), _c('a', {
staticClass: "ico fa fa-minus fs-20",
attrs: {
"disabled": skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0
},
on: {
"click": function($event) {
removeCustomSku(item)
}
}
})])]), _v(" "), _c('i-col', {
attrs: {
"span": "3"
}
}, [_c('i-input', {
attrs: {
"placeholder": "规格名称(如颜色)",
"readonly": skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0
},
on: {
"on-blur": function($event) {
triggerNewSkuOptions(item)
}
},
model: {
value: (item._name),
callback: function($$v) {
$set(item, "_name", $$v)
},
expression: "item._name"
}
})], 1), _v(" "), _c('i-col', {
attrs: {
"span": "6"
}
}, [_c('InputTag', {
ref: 'inputTag_' + index,
refInFor: true,
attrs: {
"readOnly": skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0,
"placeholder": "规格内容(回车)",
"inputStyle": "width:110px;font-size: 12px;"
},
on: {
"on-change": function($event) {
triggerNewSkuOptions(item)
},
"on-blur": function($event) {
inputTagBlur('inputTag_' + index)
}
},
model: {
value: (item.values),
callback: function($$v) {
$set(item, "values", $$v)
},
expression: "item.values"
}
})], 1), _v(" "), (skuOptions.data[item.name] != undefined && skuOptions.data[item.name].length > 0) ? _c('i-col', {
attrs: {
"span": "6"
}
}, [_c('div', {
staticStyle: {
"line-height": "32px"
}
}, [_v("\n 当前规格已被锁定,需要增加新的,请在上面添加。\n ")])]) : _e()], 1)], 1) : _e()
})], 2)]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_m(3), _v(" "), _c('div', {
staticClass: "panel-body"
}, [_c('div', {
staticClass: "text-wrapper mb-10"
}, [_v("\n 点击这里可以进行批量录入价格和库存\n "), _c('i-button', {
staticClass: "ml-10",
attrs: {
"type": "primary"
},
on: {
"click": function($event) {
batch.status = !batch.status
}
}
}, [_v("\n " + _s(batch.status && '取消' || '') + "批量录入\n ")])], 1), _v(" "), _c('i-form', {
directives: [{
name: "show",
rawName: "v-show",
value: (batch.status),
expression: "batch.status"
}],
staticClass: "batch-box clearfix",
attrs: {
"inline": ""
}
}, [_c('Form-item', {
staticClass: "mb-0 mt-35",
attrs: {
"label": "批量设置:",
"label-width": 88
}
}), _v(" "), _c('Form-item', {
attrs: {
"label": "国标码",
"label-position": "top"
}
}, [_c('i-input', {
staticStyle: {
"width": "180px"
},
attrs: {
"placeholder": "国标码",
"disabled": disabled
},
model: {
value: (batch.gbCode),
callback: function($$v) {
$set(batch, "gbCode", $$v)
},
expression: "batch.gbCode"
}
})], 1), _v(" "), _c('Form-item', {
attrs: {
"label": "库存",
"label-position": "top"
}
}, [_c('i-input', {
staticStyle: {
"width": "180px"
},
attrs: {
"placeholder": "库存",
"number": "",
"disabled": disabled
},
model: {
value: (batch.stock),
callback: function($$v) {
$set(batch, "stock", $$v)
},
expression: "batch.stock"
}
})], 1), _v(" "), _c('Form-item', {
attrs: {
"label": '成本价(' + (cartonUnits.dataSource[0].name || '最小单位') + ')',
"label-position": "top"
}
}, [_c('i-input', {
staticStyle: {
"width": "180px"
},
attrs: {
"placeholder": '成本价(' + (cartonUnits.dataSource[0].name || '最小单位') + ')',
"number": "",
"disabled": disabled
},
model: {
value: (batch.originalPrice),
callback: function($$v) {
$set(batch, "originalPrice", $$v)
},
expression: "batch.originalPrice"
}
})], 1), _v(" "), _c('Form-item', {
attrs: {
"label": '批发价(' + (cartonUnits.dataSource[0].name || '最小单位') + ')',
"label-position": "top"
}
}, [_c('i-input', {
staticStyle: {
"width": "180px"
},
attrs: {
"placeholder": '批发价(' + (cartonUnits.dataSource[0].name || '最小单位') + ')',
"number": "",
"disabled": disabled
},
model: {
value: (batch.minUnitPrice),
callback: function($$v) {
$set(batch, "minUnitPrice", $$v)
},
expression: "batch.minUnitPrice"
}
})], 1), _v(" "), _c('Form-item', {
attrs: {
"label": '批发价(' + getUnitsTitle() + ')',
"label-position": "top"
}
}, [(unitsMultiple) ? _c('i-input', {
staticStyle: {
"width": "180px"
},
attrs: {
"placeholder": '批发价(' + getUnitsTitle() + ')',
"number": "",
"disabled": disabled
},
model: {
value: (batch.wholesalePrice),
callback: function($$v) {
$set(batch, "wholesalePrice", $$v)
},
expression: "batch.wholesalePrice"
}
}) : _e()], 1), _v(" "), _c('Col', {
attrs: {
"offset": "4",
"span": "20"
}
}, [_c('i-button', {
staticStyle: {
"margin": "0 6px 6px 0"
},
attrs: {
"type": "primary"
},
on: {
"click": batchSetting
}
}, [_v("批量录入确认")]), _v(" "), _c('Upload', {
staticClass: "inline-btn",
staticStyle: {
"margin": "0 6px 6px 0",
"vertical-align": "middle"
},
attrs: {
"action": uploadOpts.url,
"headers": uploadOpts.headers,
"accept": "image/*",
"show-upload-list": false,
"on-success": masterImageUploadSuccess
}
}, [_c('Button', {
attrs: {
"type": "primary",
"icon": "ios-cloud-upload-outline"
}
}, [_v("上传主图(批量录入)")])], 1)], 1)], 1), _v(" "), _c('div', {
staticClass: "mb-14"
}, [_v("商品规格是根据"), _c('i', {
staticStyle: {
"color": "#2d8cf0"
}
}, [_v("第3步商品规格设置")]), _v("勾选的规格内容生成的。"), (unitsMultiple) ? _c('div', {
staticClass: "pull-right"
}, [_v("若不填写箱规单位批发价,则系统将自动按"), _c('span', {
staticClass: "co-red"
}, [_v("最小单位批发价*箱规数量计算箱规价格")])]) : _e()]), _v(" "), _c('i-table', {
ref: "skusTable",
attrs: {
"border": "",
"columns": skusColumns,
"data": skus.dataSource,
"width": "100%",
"size": "small",
"no-data-text": ''
}
}), _v(" "), _c('div', {
staticClass: "price-setting-group"
}, [_c('i-switch', {
on: {
"on-change": function($event) {}
},
model: {
value: (priceByLevels.enable),
callback: function($$v) {
$set(priceByLevels, "enable", $$v)
},
expression: "priceByLevels.enable"
}
}), _v(" 客户级别价格设置")], 1), _v(" "), (priceByLevels.enable) ? _c('i-table', {
ref: "levelTable",
staticStyle: {
"margin-top": "20px"
},
attrs: {
"border": "",
"columns": priceByLevelsColumns,
"data": priceByLevels.dataSource,
"width": "100%",
"size": "small",
"no-data-text": ''
}
}) : _e(), _v(" "), _c('div', {
staticClass: "price-setting-group"
}, [_c('i-switch', {
on: {
"on-change": toggleCustomer
},
model: {
value: (priceByCustomers.enable),
callback: function($$v) {
$set(priceByCustomers, "enable", $$v)
},
expression: "priceByCustomers.enable"
}
}), _v(" 特定客户价格设置")], 1), _v(" "), (priceByCustomers.enable) ? _c('i-table', {
ref: "customerTable",
attrs: {
"border": "",
"columns": priceByCustomersColumns,
"data": priceByCustomers.dataSource,
"size": "small",
"width": "100%",
"no-data-text": ''
}
}) : _e()], 1)]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_m(4), _v(" "), _c('div', {
staticClass: "panel-body"
}, [_c('i-form', {
ref: "imageValidate",
attrs: {
"model": info,
"rules": ruleValidate
}
}, [_c('Form-item', {
attrs: {
"prop": "images"
}
}, [_l((info.images), function(item) {
return _c('div', {
staticClass: "demo-upload-list"
}, [(item.status === 'finished') ? [_c('img', {
attrs: {
"src": item.url
}
}), _v(" "), _c('div', {
staticClass: "demo-upload-list-cover"
}, [_c('Icon', {
attrs: {
"type": "ios-eye-outline"
},
nativeOn: {
"click": function($event) {
handleView(item, info.images)
}
}
}), _v(" "), _c('Icon', {
attrs: {
"type": "ios-trash-outline"
},
nativeOn: {
"click": function($event) {
handleRemove(item)
}
}
})], 1)] : [(item.showProgress) ? _c('Progress', {
attrs: {
"percent": item.percentage,
"hide-info": ""
}
}) : _e()]], 2)
}), _v(" "), _c('Upload', {
ref: "imageUpload",
staticStyle: {
"display": "inline-block",
"width": "108px"
},
attrs: {
"show-upload-list": false,
"default-file-list": images,
"on-success": handleSuccess,
"format": ['jpg', 'jpeg', 'png'],
"max-size": 2048,
"accept": "image/*",
"on-format-error": handleFormatError,
"on-exceeded-size": handleMaxSize,
"before-upload": handleBeforeUpload,
"type": "drag",
"action": uploadOpts.url,
"headers": uploadOpts.headers
}
}, [_c('div', {
staticStyle: {
"width": "108px",
"height": "108px",
"line-height": "130px"
}
}, [_c('Icon', {
attrs: {
"type": "camera",
"size": "40"
}
})], 1)]), _v(" "), _c('Form-item')], 2)], 1)], 1)]), _v(" "), _c('div', {
staticClass: "panel panel-simple"
}, [_m(5), _v(" "), _c('div', {
staticClass: "panel-body"
}, [_c('textarea', {
attrs: {
"id": randomId
}
})])])]), _v(" "), _c('Modal', {
attrs: {
"width": "980",
"height": "auto",
"footerHide": true
},
model: {
value: (tutorialModal),
callback: function($$v) {
tutorialModal = $$v
},
expression: "tutorialModal"
}
}, [_c('div', {
staticStyle: {
"color": "#6C6B6B",
"text-align": "left"
},
attrs: {
"slot": "header"
},
slot: "header"
}, [_v("\n 教程 \n ")]), _v(" "), _c('div', {
staticStyle: {
"text-align": "center"
}
}, [_c('video', {
attrs: {
"id": "player",
"height": "",
"controls": "controls",
"autoplay": tutorialModal ? 'autoplay' : ''
}
}, [_c('source', {
attrs: {
"src": "/static/video/product_output.mp4",
"type": "video/mp4"
}
}), _v("\n 浏览器不支持,请"), _c('a', {
attrs: {
"href": "/static/video/product_output.mp4",
"target": "_blank"
}
}, [_v("下载")])])])]), _v(" "), _c('Modal', {
attrs: {
"width": "980",
"height": "auto",
"footerHide": true
},
model: {
value: (tutorialSkuOption),
callback: function($$v) {
tutorialSkuOption = $$v
},
expression: "tutorialSkuOption"
}
}, [_c('div', {
staticStyle: {
"color": "#6C6B6B",
"text-align": "left"
},
attrs: {
"slot": "header"
},
slot: "header"
}, [_v("\n 教程 \n ")]), _v(" "), _c('div', {
staticStyle: {
"text-align": "center"
}
}, [_c('img', {
attrs: {
"src": "/static/images/tutorialsku.gif",
"alt": "",
"width": "100%"
}
})])])], 1)
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment