提交 f47169e8 authored 作者: 郑伟娜's avatar 郑伟娜

Merge branch 'M-2.6'

......@@ -71,6 +71,7 @@
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0",
"wangeditor": "^4.7.11",
"xlsx": "^0.17.0"
},
"devDependencies": {
......
......@@ -18,7 +18,7 @@ export function GetCategory(query) {
})
}
// 经营类目
// 经营类目-12-23-bak
export function NewGetCategory(query) {
return request({
url: '/system/goodsNew/businessList',
......@@ -26,6 +26,16 @@ export function NewGetCategory(query) {
params: query
})
}
// 营业类目
export function NewGetCategoryData(data) {
return request({
url: '/local/getCategoryList',
method: 'post',
data: data
})
}
// 查询运费模板
export function GetFreight(query) {
return request({
......
......@@ -71,3 +71,12 @@ export function cancelOnsaleAllData(data) {
data: data
})
}
// 保存 不下架编辑商品数据
export function saveHotEditGoodsData(data) {
return request({
url: '/system/goodsNew/onsaleUpdate',
method: 'post',
data: data
})
}
@font-face {
font-family: "iconfont"; /* Project id 3034653 */
src: url('iconfont.woff2?t=1639989114597') format('woff2'),
url('iconfont.woff?t=1639989114597') format('woff'),
url('iconfont.ttf?t=1639989114597') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-iconset0435:before {
content: "\e73a";
}
!function(e){var t,n,o,i,c,d='<svg><symbol id="icon-iconset0435" viewBox="0 0 1024 1024"><path d="M810.666667 640l-192 0L618.666667 128c0-46.933333-38.4-85.333333-85.333333-85.333333l-42.666667 0c-46.933333 0-85.333333 38.4-85.333333 85.333333l0 512-192 0c-12.8 0-21.333333 8.533333-21.333333 21.333333 0 6.4 2.133333 10.666667 6.4 14.933333l298.666667 298.666667c4.266667 4.266667 8.533333 6.4 14.933333 6.4 6.4 0 10.666667-2.133333 14.933333-6.4l298.666667-298.666667c4.266667-4.266667 6.4-8.533333 6.4-14.933333C832 648.533333 823.466667 640 810.666667 640zM512 930.133333 264.533333 682.666667 448 682.666667 448 128c0-23.466667 19.2-42.666667 42.666667-42.666667l42.666667 0c23.466667 0 42.666667 19.2 42.666667 42.666667l0 554.666667 183.466667 0L512 930.133333z" ></path></symbol></svg>',l=(l=document.getElementsByTagName("script"))[l.length-1].getAttribute("data-injectcss"),s=function(e,t){t.parentNode.insertBefore(e,t)};if(l&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}function a(){c||(c=!0,o())}function r(){try{i.documentElement.doScroll("left")}catch(e){return void setTimeout(r,50)}a()}t=function(){var e,t;(t=document.createElement("div")).innerHTML=d,d=null,(e=t.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",t=e,(e=document.body).firstChild?s(t,e.firstChild):e.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,i=e.document,c=!1,r(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,a())})}(window);
\ No newline at end of file
{
"id": "3034653",
"name": "STBZ",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "554469",
"name": "向下箭头",
"font_class": "iconset0435",
"unicode": "e73a",
"unicode_decimal": 59194
}
]
}
......@@ -66,6 +66,7 @@ export default {
position: relative;
height: 100%;
width: 100%;
font-size: 16px;
&.mobile.openSidebar {
position: fixed;
......
......@@ -25,6 +25,10 @@ import Pagination from "@/components/Pagination";
import VueAwesomeSwiper from 'vue-awesome-swiper' // 引入swiper
import 'swiper/css/swiper.min.css' // 引入swiper样式/
Vue.use(VueAwesomeSwiper) // 注册swiper
// 阿里图标
import './assets/icons/iconfont/iconfont.css';
// import '../../assets/icons/iconfont/iconfont.js'
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
......
......@@ -39,7 +39,7 @@ service.interceptors.request.use(config => {
if (getToken() && !isToken) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
//config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5ODMzMzk3LCJpc3MiOiJnaW4tYmxvZyJ9.rh-WXSaFqgqY611Tm5dhba532OYEZvm06vUmgZknoy4'
return config
}, error => {
console.log("25reject");
......
......@@ -658,7 +658,9 @@
</script>
<style lang="scss" type="text/stylus" scoped>
.fill-brand-inf {
font-size : 16px;
width: 100%;
height: 100%;
overflow-x: hidden;
......
......@@ -797,6 +797,7 @@
<style lang="scss" type="text/stylus" scoped>
.fill-store-inf {
font-size : 16px;
width: 100%;
height: 100%;
overflow-x: hidden;
......
......@@ -565,6 +565,7 @@
<style lang="scss" type="text/stylus" scoped>
.fill-store-inf {
font-size : 16px;
width: 100%;
height: 100%;
overflow-x: hidden;
......
......@@ -81,6 +81,7 @@
<style lang="scss" type="text/stylus" scoped>
.entryDetails {
font-size : 16px;
width: 100%;
height: 100%;
overflow-x: hidden;
......
......@@ -79,6 +79,7 @@
<style lang="scss" type="text/stylus" scoped>
.to-review {
font-size : 16px;
width: 100%;
height: 100%;
overflow: hidden;
......
......@@ -62,6 +62,7 @@
<style lang="scss" type="text/stylus" scoped>
.to-review {
font-size : 16px;
width: 100%;
height: 100%;
overflow: hidden;
......
......@@ -30,7 +30,8 @@
<el-row class="row-title">
<el-col :span="4" class="text-r">手续费</el-col>
<el-col :span="9" class="text-l">{{ withdrawInfo.service_fee ? withdrawInfo.service_fee / 100 : 0 }}</el-col>
<el-col :span="9" class="text-l">{{ 0 }}</el-col>
<!-- <el-col :span="9" class="text-l">{{ withdrawInfo.service_fee ? withdrawInfo.service_fee / 100 : 0 }}</el-col>-->
</el-row>
<el-row class="row-title">
......
......@@ -33,7 +33,7 @@
不允许手动输入,提现金额为全部的可提现余额,手续费将从您的提现金额中扣除,以实际到账为准(开票以实际到账金额开具)。
提现金额至少为100元才可以操作提现
</span>
<p class="withdraw-tip-spe">当前提现手续费为:{{ chargeCount }}</p>
<p class="withdraw-tip-spe">当前提现手续费为:0</p>
</el-form-item>
<el-form-item label="提现密码:" prop="pay_pass">
......
......@@ -66,7 +66,8 @@
@pagination="getList"
/>
<!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="isOpen" v-if="isOpen" width="70%" class="freightTemplate-add">
<el-dialog :title="title" :visible.sync="isOpen" v-if="isOpen" width="70%" class="freightTemplate-add"
:close-on-click-modal="false" center>
<IndexBtn :option="form" @closeIndexbtn="closeDialog"/>
</el-dialog>
</el-card>
......
......@@ -127,9 +127,10 @@
>
</el-form>
<el-dialog title="选择不配送省" :visible.sync="dialogVisible" width="30%" append-to-body>
<el-dialog title="选择不配送省" :visible.sync="dialogVisible" width="30%" append-to-body
:close-on-click-modal="false" center >
<div>
<el-checkbox-group v-model="checkList">
<el-checkbox-group v-model="checkList" class="spe-checkbox-group-con">
<el-checkbox
v-for="(item, index) in arrlist"
:key="index"
......@@ -139,8 +140,8 @@
</el-checkbox-group>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="btndisabled()">确 定</el-button>
<el-button @click="dialogVisible = false" size="small">取 消</el-button>
<el-button type="primary" @click="btndisabled()" size="small">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -219,7 +220,7 @@ export default {
},
methods: {
btndisabled(){
//debugger
debugger
let checkListString = '';
if (this.btnindex == 99) {
checkListString = this.checkList.join();
......@@ -244,9 +245,14 @@ export default {
})
},
/** 选择 配送区域*/
/** 选择 配送区域
* i= 1 ,操作是不配送区域
* */
opendias(type, i, index) {
//debugger
// 处理不配送区域
// 初始化 已经勾选的区域(包含,不配送 和 配送的)
this.disabledate = [];
this.goodsDate.dispatching.forEach((element) => {
if(element.a && element.a != '') {
......@@ -262,15 +268,19 @@ export default {
this.disabledate.push(arr[i]);
}
this.btnindex = index;
// 将全部 省的状态初始化为 未选中
this.arrlist.forEach(item => {
item.value = false;
})
// 已经选择过的 区域 array
this.checkList = type.split(",");
let disabledates = JSON.parse(JSON.stringify(this.disabledate)); //可以将json对象转换成json对符串
let disabarr = this.unique(disabledates, this.checkList) //去掉当前选择的disabled效果
// 所有已经勾选的 区域
let disabledates = JSON.parse(JSON.stringify(this.disabledate));
// 已经勾选的 配送区域
let disabarr = this.unique(disabledates, this.checkList)
this.arrlist.forEach(item => {
if (disabarr.includes(item.lable)) {
item.value = true
......@@ -421,4 +431,13 @@ li {
margin:0 auto;
display: block;
}
.spe-checkbox-group-con {
margin-left: 20px;
}
.spe-checkbox-group-con >>> .el-checkbox {
width: 70px;
margin: 0 6px 5px;
}
</style>
......@@ -18,7 +18,7 @@
<el-select v-model="goodsAfterSaleForm.delay_compensate" style="width:400px;" placeholder="请选择发货时效">
<el-option label="24小时" :value="24"></el-option>
<el-option label="48小时" :value="48"></el-option>
<el-option label="72小时" :value="72"></el-option>
<!-- <el-option label="72小时" :value="72"></el-option> -->
</el-select>
</el-form-item>
......
<template>
<div class="goods-img">
<div id="wangeditor" ref="editorElem">
</div>
</div>
</template>
<script>
import E from 'wangeditor'
import { UploadImg } from '@/api/module/goods'
export default {
props: {
description: {
type: String,
required: true
}
},
data() {
return {
editor: null
}
},
mounted() {
let that = this
// 富文本编辑器
const editor = new E('#wangeditor')
editor.config.height = 500
editor.config.uploadImgMaxLength = 1
editor.config.customUploadImg = function (resultFiles, insertImgFn) {
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
that.getBase64(resultFiles[0]).then((res) => {
let result = res.split(",")
let Base64img = result[1]
// 上传图片,返回结果,将图片插入到编辑器中
let data = {"img_data": Base64img}
UploadImg(data).then(res => {
if (res.code == 1) {
insertImgFn(res.data.image_url)
}
})
})
}
editor.create()
this.editor = editor
if( this.description ) {
this.editor.txt.html(this.description)
}
},
methods: {
initInfo() {
this.editor = null
},
getBase64(file) {
return new Promise(function (resolve, reject) {
let reader = new FileReader();
let imgResult = "";
reader.readAsDataURL(file);
reader.onload = function () {
imgResult = reader.result;
};
reader.onerror = function (error) {
reject(error);
};
reader.onloadend = function () {
resolve(imgResult);
};
});
},
}
}
</script>
<style scoped>
.goods-img {
padding: 20px;
}
/deep/ .w-e-text-container {
z-index: 1000!important;
}
/deep/ .w-e-toolbar {
z-index: 1001!important;
}
</style>
......@@ -2,23 +2,23 @@
<div class="goods-info">
<el-form :model="goodsInfoForm" :rules="goodsInfoRules" ref="goodsInfoForm" label-width="150px" class="demo-goodsInfoForm" size="small">
<el-form-item label="商品分类:" prop="categoryStr">
<el-input style="width:420px;" v-model="goodsInfoForm.categoryStr" :disabled="true"></el-input>
<el-input style="width:420px;" v-model.trim="goodsInfoForm.categoryStr" :disabled="true"></el-input>
<el-link class="edit-type-span el-icon-edit" type="primary" :underline="false" @click="editType">修改所在类目</el-link>
<span class="tip-span">该商品所在类目须支持七天无理由退货</span>
</el-form-item>
<el-form-item label='商品标题:' prop="goods_name">
<el-input v-model="goodsInfoForm.goods_name" placeholder="请输入商品标题" style="width:420px;"></el-input>
<el-input v-model.trim="goodsInfoForm.goods_name" placeholder="请输入商品标题" style="width:420px;"></el-input>
<span class="tip-span ml20">商品名称限制在50字以内,不要填写与商品无关的词</span>
</el-form-item>
<el-form-item label='商品关键词:' prop="goods_des">
<el-input v-model="goodsInfoForm.goods_des" placeholder="请输入商品关键词" style="width:420px;"></el-input>
<el-input v-model.trim="goodsInfoForm.goods_des" placeholder="请输入商品关键词" style="width:420px;"></el-input>
<span class="tip-span ml20">关键词之间用 <strong>英文逗号</strong> 分开,最多可以添加5个</span>
</el-form-item>
<el-form-item label="商品产地:" prop="producing_area">
<el-select v-model="goodsInfoForm.producing_area" placeholder="请选择商品产地" style="width: 420px;">
<el-select v-model.trim="goodsInfoForm.producing_area" placeholder="请选择商品产地" style="width: 420px;">
<el-option
v-for="item in areaOptions"
:key="item.id"
......@@ -29,7 +29,7 @@
</el-form-item>
<el-form-item label="商品发货地:" prop="deliver_area">
<el-select v-model="goodsInfoForm.deliver_area" placeholder="请选择商品发货地" style="width: 420px;">
<el-select v-model.trim="goodsInfoForm.deliver_area" placeholder="请选择商品发货地" style="width: 420px;">
<el-option
v-for="item in areaOptions"
:key="item.id"
......@@ -40,12 +40,12 @@
</el-form-item>
<el-form-item label='商品单位:' prop="unit">
<el-input v-model="goodsInfoForm.unit" placeholder="请输入商品单位" style="width:420px;"></el-input>
<el-input v-model.trim="goodsInfoForm.unit" placeholder="请输入商品单位" style="width:420px;"></el-input>
<!-- <span class="tip-span ml20">关键词之间用逗号分开,最多可以添加5个</span>-->
</el-form-item>
<el-form-item label="所属品牌:" prop="brand_id">
<el-select v-model="goodsInfoForm.brand_id" placeholder="请选择商品品牌" style="width: 420px;">
<el-select v-model.trim="goodsInfoForm.brand_id" placeholder="请选择商品品牌" style="width: 420px;">
<el-option
v-for="item in brandOptions"
:key="item.id"
......@@ -57,11 +57,11 @@
</el-form-item>
<el-form-item label='市场参考价链接:' prop="web_url">
<el-input v-model="goodsInfoForm.web_url" placeholder="请输入京东或者淘宝的商品链接" style="width:420px;"></el-input>
<el-input v-model.trim="goodsInfoForm.web_url" placeholder="请输入京东或者淘宝的商品链接" style="width:420px;"></el-input>
</el-form-item>
<el-form-item label='商品编码:' prop="out_goods_id">
<el-input v-model="goodsInfoForm.out_goods_id" placeholder="请输入商品编码(非必须)" style="width:420px;"></el-input>
<el-input v-model.trim="goodsInfoForm.out_goods_id" placeholder="请输入商品编码(非必须)" style="width:420px;"></el-input>
</el-form-item>
<el-form-item label="商品图片:" prop="imgs">
......@@ -102,7 +102,7 @@
width="60%"
center
>
<el-cascader-panel v-show="editGoodsTypeDialog" v-model="SSQGoodsList" :props='goodsprops' :options="fuckoptions" @active-item-change="SSQGoodsChange" ref="ssqGoodsCascader"></el-cascader-panel>
<el-cascader-panel v-show="editGoodsTypeDialog" v-model.trim="SSQGoodsList" :props='goodsprops' :options="fuckoptions" @active-item-change="SSQGoodsChange" ref="ssqGoodsCascader"></el-cascader-panel>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelType" size="mini">取 消</el-button>
<el-button type="primary" @click="saveType" size="mini">确 定</el-button>
......
......@@ -7,15 +7,16 @@
</p>
<div v-show="(!orgGoodsPam.pamTableList || orgGoodsPam.pamTableList.length === 0)">
<p style="margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;">默认</p>
<el-table
border
size="small"
:data="singleSpecTable"
style="width: 80%;margin-right:10%;"
>
<el-table-column align="center" prop="js_price" label="协议价">
<el-table-column align="center" prop="js_price" label="协议价" >
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.js_price" placeholder="请输入协议价" ></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.js_price" placeholder="请输入协议价" ></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="sl_price" label="结算价">
......@@ -25,23 +26,23 @@
</el-table-column>
<el-table-column align="center" prop="price" label="指导价">
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.price" placeholder="请输入指导价"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.price" placeholder="请输入指导价"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="sc_price" label="市场价">
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.sc_price" placeholder="请输入市场价"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.sc_price" placeholder="请输入市场价"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="stock" label="库存量">
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.stock" placeholder="请输入库存量"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.stock" placeholder="请输入库存量"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="weight" label="重量">
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.weight" placeholder="请输入重量"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.weight" placeholder="请输入重量"></el-input>
</template>
</el-table-column>
......@@ -63,8 +64,7 @@
<!-- </el-table-column>-->
</el-table>
</div>
<div v-show="orgGoodsPam.pamTableList.length > 0" v-for="(item,index) in orgGoodsPam.pamTableList" :key="index"
<div v-if="orgGoodsPam.pamTableList.length > 0" v-for="(item,index) in orgGoodsPam.pamTableList" :key="index"
class="single-spe-con">
<p style="margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;">
<span v-show="orgGoodsPam.pamNameList.length === 1">
......@@ -83,8 +83,15 @@
style="width: 80%"
>
<el-table-column align="center" prop="js_price" label="协议价">
<template slot="header">
<span>协议价</span>
<el-tooltip placemetn="top" v-if="index==0 && orgGoodsPam.pamTableList.length >= 1">
<span slot="content">点击可批量设置价格</span>
<span class="spe-ali-icon0435 iconfont icon-iconset0435" @click="applyAllTable('js_price')"></span>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.js_price" placeholder="请输入协议价"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.js_price" placeholder="请输入协议价"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="sl_price" label="结算价">
......@@ -93,23 +100,51 @@
</template>
</el-table-column>
<el-table-column align="center" prop="price" label="指导价">
<template slot="header">
<span>指导价</span>
<el-tooltip placemetn="top" v-if="index==0 && orgGoodsPam.pamTableList.length >= 1">
<span slot="content">点击可批量设置价格</span>
<span class="spe-ali-icon0435 iconfont icon-iconset0435" @click="applyAllTable('price')"></span>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.price" placeholder="请输入指导价"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.price" placeholder="请输入指导价"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="sc_price" label="市场价">
<template slot="header">
<span>市场价</span>
<el-tooltip placemetn="top" v-if="index==0 && orgGoodsPam.pamTableList.length >= 1">
<span slot="content">点击可批量设置价格</span>
<span class="spe-ali-icon0435 iconfont icon-iconset0435" @click="applyAllTable('sc_price')"></span>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.sc_price" placeholder="请输入市场价"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.sc_price" placeholder="请输入市场价"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="stock" label="库存量">
<template slot="header">
<span>库存量</span>
<el-tooltip placemetn="top" v-if="index==0 && orgGoodsPam.pamTableList.length >= 1">
<span slot="content">点击可批量设置价格</span>
<span class="spe-ali-icon0435 iconfont icon-iconset0435" @click="applyAllTable('stock')"></span>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.stock" placeholder="请输入库存量"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.stock" placeholder="请输入库存量"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="weight" label="重量">
<template slot="header">
<span>重量</span>
<el-tooltip placemetn="top" v-if="index==0 && orgGoodsPam.pamTableList.length >= 1">
<span slot="content">点击可批量设置价格</span>
<span class="spe-ali-icon0435 iconfont icon-iconset0435" @click="applyAllTable('weight')"></span>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.weight" placeholder="请输入重量"></el-input>
<el-input size="mini" style="width:90%" v-model.trim="scope.row.weight" placeholder="请输入重量"></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="thumb" label="图片">
......@@ -211,7 +246,6 @@ export default {
'parameterdata': function(val) {
//debugger
this.orgGoodsPam = val;
//console.log("监听",this.orgGoodsPam);
},
},
created() {
......@@ -352,6 +386,13 @@ export default {
// }
// }
},
/** 一键应用所有 */
applyAllTable(key) {
let val = this.orgGoodsPam.pamTableList[0][0][key]
this.orgGoodsPam.pamTableList.map(item => {
item[0][key] = val
})
},
// 删除 单个规格的图片
delSingleSpecImg(index,row) {
......@@ -366,8 +407,16 @@ export default {
speImgLeave(index, row) {
this.isHoverSpeImg = false;
},
renderHeaderJSPrice(h) {
return h(
<div>
<span>协议价</span>
<span>点击1</span>
</div>
)
},
// -- 通用 方法 --
// 图片转换为 base64
/** 图片转换为 base64*/
getBase64(file) {
return new Promise(function (resolve, reject) {
let reader = new FileReader();
......@@ -462,6 +511,12 @@ export default {
margin-left: -9px;
}
.spe-ali-icon0435 {
color: red;
vertical-align: middle;
margin-left: 3px;
}
.del-span-block {
display : none;
}
......
......@@ -7,7 +7,7 @@
<div>
<el-select
:ref="'speNameDom' + index "
v-model="speItem.spec_name"
v-model.trim="speItem.spec_name"
size="small"
style="width: 300px"
filterable
......@@ -23,6 +23,7 @@
:value="itemSN.name"
>
<span style="float: left" class="span-style">{{ itemSN.name }}</span>
<span style="float: right" class="spe-span-del el-icon-circle-close" @click.stop="deleteSpeOption(itemSN,index)"></span>
<div class="flag">
<svg-icon icon="edit" iconClass="template_edit_style" @click="addSpeName(index)"/>
</div>
......@@ -32,7 +33,7 @@
</div>
<div class="spe-params-con">
<div style="display: inline-block" v-for="(itemSV,indexSV) in speItem.spec_value" :key="indexSV">
<el-input v-model="itemSV.value" size="small" placeholder="请输入规格参数" class="spe-params-input-item" @blur="paramNameInputBlur(index,indexSV)">
<el-input v-model.trim="itemSV.value" size="small" placeholder="请输入规格参数" class="spe-params-input-item" @blur="paramNameInputBlur(index,indexSV)">
<i v-if="speItem.spec_value.length !== 1" slot="suffix" class="el-input__icon el-icon-delete el-icon-delete-h" @click="deleteSpeParam(index,indexSV)"></i>
</el-input>
</div>
......@@ -62,7 +63,7 @@
<p class="add-spec-dialog-con">
<span style="margin-right:30px;">输入规格名称:</span>
<span>
<el-input v-model="specName_sm" placeholder="请输入规格名称" size="small" style="width: 280px;"></el-input>
<el-input v-model.trim="specName_sm" placeholder="请输入规格名称" size="small" style="width: 280px;"></el-input>
</span>
</p>
</div>
......@@ -92,17 +93,10 @@ export default {
spec_name: '', // 规格名称
spec_value: []
},
speParamName:{
value: ''
},
speOptions: [{
id: '1',
name: '颜色'
}, {
id: '2',
name: '尺码'
}],
speOptions: [],
localSpeOptions: [],
// 规格名称,value组成的数组
speNameList: [],
......@@ -188,6 +182,7 @@ export default {
addSpeParam(index) {
let valueObj = { value: ''}
this.$set(this.speData[index].spec_value,this.speData[index].spec_value.length,valueObj);
// console.log(1111,this.speData);
},
/** 删除 规格参数 */
deleteSpeParam(index,indexSV) {
......@@ -229,7 +224,6 @@ export default {
el.onclick = () => {
// 底部按钮的点击事件
_this.addSpeName(index);
// localSttorage 存储 下拉数据
if(speNameDom.toggleDropDownVisible) {
speNameDom.toggleDropDownVisible(false);
......@@ -252,12 +246,23 @@ export default {
},
/* 增加 规格名称 */
addSpeName(index) {
this.specName_sm = '';
this.addSpecNameDialog = true;
},
/** 删除 规格名称 */
deleteSpeOption(indexItem,index) {
for(let i = 0; i < this.speOptions.length; i++) {
if (indexItem.id == this.speOptions[i].id) {
this.speOptions.splice(i,1)
break
}
}
let localJSON = JSON.stringify(this.speOptions);
window.localStorage.setItem('localSpeOptions',localJSON)
},
// 添加规格名称,对话框的退出
cancelSpec() {
this.specName_sm = '';
this.addSpecNameDialog = false;
},
// 规格名称,保存
......@@ -486,6 +491,12 @@ export default {
margin: 20px 0;
}
.spe-span-del {
color: red;
font-size: 14px;
margin-top: 10px;
}
/* 商品规格 - 规格名称 - 参数input */
.spe-params-input-item {
width: 150px;
......
......@@ -10,7 +10,8 @@
<p class="goods-type-tip">为商品设置正确的类目,能让商品快速的被搜索到</p>
</div>
<div class="goods-type-options">
<el-cascader-panel v-model="SSQList" :props='props' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>
<!-- <el-cascader-panel v-model="SSQList" :props='props' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>-->
<el-cascader-panel v-model="SSQList" :props='propsOptions' @change="SSQChange" ref="ssqCascader"></el-cascader-panel>
</div>
<el-button type="primary" class="next-step" :disabled="isNextStep" @click="nextStep">下一步</el-button>
</div>
......@@ -51,7 +52,7 @@
<div class="floor-item">
<div class="floor-item-box">
<p class="card-header-title floor-item-box-title"><span class="blue-block-goods blue-block-goods-title"></span>商品详情</p>
<Goodsimg ref="goodsdetailsimg" :imgdata="imgdata"/>
<Goodsimg ref="goodsdetailsimg" :description="description"/>
</div>
</div>
<!-- 售后及服务 -->
......@@ -78,21 +79,21 @@
</template>
<script>
import { NewGetCategory,addGoods,getGoodsNew,updateGoodsNew } from '@/api/module/goods';
import { NewGetCategory,NewGetCategoryData,addGoods,getGoodsNew,updateGoodsNew } from '@/api/module/goods';
import Goodsinfomation from './components/goodsinfomation';
import GoodsSpecifications from './components/goodsspecifications';
import GoodsParameter from './components/goodsparameter';
import Goodsimg from './components/goodsimg';
import Goodsimg from './components/goodsimg2';
import Goodsaftersale from './components/goodsaftersale';
export default {
name: 'Index',
props: {
option: {
type: Number,
required: true
}
},
// props: {
// option: {
// type: Number,
// required: true
// }
// },
components: {
Goodsinfomation,
GoodsSpecifications,
......@@ -105,12 +106,12 @@
goodsLoading: false,
SSQList: [], // 省市区
SSQStr: '', // 省市区 拼接
props: {
propsOptions: {
expandTrigger: 'click',
lazy: true,
lazyLoad: this.lazyLoad,
value: "id",
label: 'label',
label: 'title',
leaf: 'leaf'
},
isNextStep: true,
......@@ -140,9 +141,10 @@
singleSpecTable: []
},
/* 商品详情 */
imgdata: {
description: ''
},
// imgdata: {
// description: ''
// },
description: '',
/* 售后及服务 */
goodsaftersale: {
stags: [],
......@@ -155,12 +157,14 @@
}, // 商品所有数据
TIMER: null,
hehe: 0,
option: 0
} // return end
},
created() {
// option 商品的id
//debugger
this.option = Number(this.$route.query.goods_id)
if( this.option && this.option !== 0 ) {
let data = { goodsId: this.option};
getGoodsNew(data).then(res => {
......@@ -234,7 +238,7 @@
}
// 商品详情
this.imgdata.description = res.data.description;
this.description = res.data.description;
// 售后服务
this.goodsaftersale.freight_id = res.data.freight_id;
......@@ -330,19 +334,19 @@
const level = node.level;
let limboNode = {};
if(level === 0) {
limboNode = {id: 0}
limboNode = {parent_id: 0}
}
if(level === 1) {
limboNode = { id: node.value };
limboNode = { parent_id: node.value };
}
if(level === 2) {
limboNode = { id: node.value };
limboNode = { parent_id: node.value };
}
NewGetCategory(limboNode).then(res => {
NewGetCategoryData(limboNode).then(res => {
let result = {};
result = res.data
if (level === 0) {
result = res.data
result.forEach(item => {
item.value = item.id;
item.label = item.label;
......@@ -369,13 +373,9 @@
if (level === 2) {
for(let i = 0; i < res.data.length; i++) {
if( res.data[i].children.length > 0) {
for(let j = 0; j < res.data[i].children.length; j++) {
if( limboNode.id === res.data[i].children[j].id ) {
result = res.data[i].children[j].children;
break;
}
}
if( limboNode.id === res.data[i].id ) {
result = res.data[i].children;
break;
}
}
......@@ -451,7 +451,6 @@
}
}else {
// 无规格组合数据
debugger
let slingleSpeObj = spsjData1[0];
if ( !Number(slingleSpeObj['js_price']) || Number(slingleSpeObj['js_price']) <0 ) {
goodsPriceMsg = '[ 商品售价 ]中,协议价不能为空,并且只能填大于0的数值'
......@@ -472,7 +471,8 @@
}
// 商品详情 是否填写完整
let isGoodsDetailsImgMsg = (this.$refs.goodsdetailsimg.goodsDeForm.description.indexOf('img') > -1) ? true : false;
// let isGoodsDetailsImgMsg = (this.$refs.goodsdetailsimg.goodsDeForm.description.indexOf('img') > -1) ? true : false;
let isGoodsDetailsImgMsg = (this.$refs.goodsdetailsimg.editor.txt.html()) ? true : false
// 售后服务 是否填写完整
let isGoodsAfterSaleMsg = this.$refs['goodsaftersale'].validateGoodsAfterSaleForm();
......@@ -490,9 +490,8 @@
return
}
}
if(!isGoodsDetailsImgMsg) {
this.$message({type:'error',message:'请先上传描述商品详情的图片'});
this.$message({type:'error',message:'商品详情未填写完整'});
this.setFloorNavMountClick(3);
return
}
......@@ -561,13 +560,23 @@
// 商品详情 数据
let spxqData = this.$refs.goodsdetailsimg.goodsDeForm;
// let spxqData = this.$refs.goodsdetailsimg.goodsDeForm;
let spxqData = String(this.$refs.goodsdetailsimg.editor.txt.html())
// 售后服务 数据
let ssffData = this.$refs.goodsaftersale.goodsAfterSaleForm;
console.log(569,ssffData);
if (ssffData.delay_compensate == 72) {
this.$message({ type: 'warning',message: '发货时长不能超过48小时,请重新编辑' });
return
}
// return
// 所有数据合并
Object.assign( this.goodsAllData, spxxData, spsjData, spxqData, ssffData);
Object.assign( this.goodsAllData, spxxData, spsjData, ssffData);
this.goodsAllData.description = spxqData
// 经营类目,服务标签,需要单独处理数据格式
this.goodsAllData.category_id = spxxData.categoryList.slice(-1)[0] ? spxxData.categoryList.slice(-1)[0] : '';
......
......@@ -171,7 +171,7 @@
<template slot-scope="scope">
<span>{{ timeFormatter(scope.row.created_time) }}</span><br/>
<span :class="{ 'red-text' : sendTimeFormatter(scope.row.send_time) == '未发货' }">{{ sendTimeFormatter(scope.row.send_time) }}</span><br/>
<span :class="{ 'red-text' : updatedTimeFormatter(scope.row.updated_time) == '未完成' }">{{ updatedTimeFormatter(scope.row.updated_time) }}</span>
<span :class="{ 'red-text' : updatedTimeFormatter(scope.row.updated_time) == '未完成' }">{{ updatedTimeFormatter(scope.row.updated_time, scope.row.goods_status) }}</span>
</template>
</el-table-column>
<el-table-column prop="dispatch_price" width="100" label="运费" align="center">
......@@ -461,8 +461,8 @@
},
/** 发货时间 格式化 */
updatedTimeFormatter(time) {
if(time) {
updatedTimeFormatter(time, status) {
if(time && status == 2) {
return dateFormat(time *1000, 'Y-m-d H:i:s')
} else {
return '未完成'
......@@ -735,9 +735,9 @@
// this.excelList = item[0].sheet
item[0].sheet.map((item, index) => {
this.excelList.push({
goods_order_sn: item['商品订单号'],
express_name: item['快递公司'],
express_sn: item['快递单号']
goods_order_sn: item['商品订单号'].toString().trim(),
express_name: item['快递公司'].toString().trim(),
express_sn: Number(item['快递单号'].toString().trim())
})
})
}
......
......@@ -238,6 +238,9 @@
},
// 修改 登录密码
editLogin() {
if (this.$refs.loginForm) {
this.$refs['loginForm'].resetFields();
}
this.isLogin = true;
},
// 修改 提现密码
......@@ -310,7 +313,7 @@
}, 1000)
}
getTelphoneCode(this.setForm.name).then(res => {
if(res.code === 1) {
if(res.code == 1) {
this.$message({type:"success",message: '验证码发送成功'});
}else {
this.$message({type:"error",message: res.message ? res.message : '验证码发送失败'});
......@@ -383,7 +386,7 @@
},
// 登录密码 确定
submitLogin(formName) {
console.log(378,this.loginForm);
// console.log(378,this.loginForm);
this.$refs[formName].validate(valid => {
if (valid) {
changeLoginPassword(this.loginForm).then(res=> {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论