合并master
This commit is contained in:
		
						commit
						f87306f6de
					
				@ -457,23 +457,21 @@ export function memberMsgList (params) {
 | 
				
			|||||||
 * 设置消息为已读
 | 
					 * 设置消息为已读
 | 
				
			||||||
 * @param {String} messageId 消息id
 | 
					 * @param {String} messageId 消息id
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 export function readMemberMsg (params) {
 | 
					 export function readMemberMsg (id) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: `/buyer/member/message`,
 | 
					    url: `/buyer/member/message/${id}`,
 | 
				
			||||||
    method: Method.PUT,
 | 
					    method: Method.PUT,
 | 
				
			||||||
    needToken: true,
 | 
					    needToken: true
 | 
				
			||||||
    params
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * 删除会员消息
 | 
					 * 删除会员消息
 | 
				
			||||||
 * @param {String} messageId 消息id
 | 
					 * @param {String} messageId 消息id
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 export function delMemberMsg (params) {
 | 
					 export function delMemberMsg (id) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: `/buyer/member/message`,
 | 
					    url: `/buyer/member/message/${id}`,
 | 
				
			||||||
    method: Method.DELETE,
 | 
					    method: Method.DELETE,
 | 
				
			||||||
    needToken: true,
 | 
					    needToken: true
 | 
				
			||||||
    params
 | 
					 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,22 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="msg-list">
 | 
					  <div class="msg-list">
 | 
				
			||||||
    <card _Title="我的消息" :_Tabs="status" :_Size="16" />
 | 
					    <card _Title="我的消息" :_Tabs="status" :_Size="16"  @_Change="statusChange"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <Table v-if="params.status != 'ALREADY_REMOVE' " :columns="messageColumns" :data="messageData.records"></Table>
 | 
				
			||||||
 | 
					    <Table v-if="params.status == 'ALREADY_REMOVE' " :columns="messageDelColumns" :data="messageData.records"></Table>
 | 
				
			||||||
 | 
					    <!-- 分页 -->
 | 
				
			||||||
 | 
					    <Page
 | 
				
			||||||
 | 
					      style="float:right;margin-top:10px"
 | 
				
			||||||
 | 
					      :current="params.pageNumber"
 | 
				
			||||||
 | 
					      :total="messageData.total"
 | 
				
			||||||
 | 
					      :page-size="params.pageSize"
 | 
				
			||||||
 | 
					      @on-change="changePage"
 | 
				
			||||||
 | 
					      @on-page-size-change="changePageSize"
 | 
				
			||||||
 | 
					      :page-size-opts="[10, 20, 50]"
 | 
				
			||||||
 | 
					      size="small"
 | 
				
			||||||
 | 
					      show-total
 | 
				
			||||||
 | 
					      show-elevator
 | 
				
			||||||
 | 
					    ></Page>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
@ -8,27 +24,171 @@ import {memberMsgList, readMemberMsg, delMemberMsg} from '@/api/member.js'
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      list: [], // 会员列表
 | 
					      messageData: {}, // 消息数据
 | 
				
			||||||
      status: ['未读', '已读', '回收站'],
 | 
					      status: ['未读', '已读', '回收站'],
 | 
				
			||||||
      params: { // 请求参数
 | 
					      params: { // 请求参数
 | 
				
			||||||
        pageNumber: 1,
 | 
					        pageNumber: 1,
 | 
				
			||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        status: ''
 | 
					        status: 'UN_READY'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      messageDelColumns: [ // table展示数据
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '消息标题',
 | 
				
			||||||
 | 
					          key: 'title',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          tooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '消息内容',
 | 
				
			||||||
 | 
					          key: 'content',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          tooltip: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '发送时间',
 | 
				
			||||||
 | 
					          key: 'createTime',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          width: 240
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      messageColumns: [ // table展示数据
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '消息标题',
 | 
				
			||||||
 | 
					          key: 'title',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          tooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '消息内容',
 | 
				
			||||||
 | 
					          key: 'content',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          tooltip: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '发送时间',
 | 
				
			||||||
 | 
					          key: 'createTime',
 | 
				
			||||||
 | 
					          align: 'left',
 | 
				
			||||||
 | 
					          width: 240
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          title: '操作',
 | 
				
			||||||
 | 
					          key: 'action',
 | 
				
			||||||
 | 
					          align: 'center',
 | 
				
			||||||
 | 
					          fixed: 'right',
 | 
				
			||||||
 | 
					          width: 150,
 | 
				
			||||||
 | 
					          render: (h, params) => {
 | 
				
			||||||
 | 
					            if (params.row.status === 'UN_READY') {
 | 
				
			||||||
 | 
					              return h('div', [
 | 
				
			||||||
 | 
					                h(
 | 
				
			||||||
 | 
					                  'Button',
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    props: {
 | 
				
			||||||
 | 
					                      type: 'info',
 | 
				
			||||||
 | 
					                      size: 'small'
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    style: {
 | 
				
			||||||
 | 
					                      marginRight: '5px'
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    on: {
 | 
				
			||||||
 | 
					                      click: () => {
 | 
				
			||||||
 | 
					                        this.setRead(params.row.id);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                  '已读'
 | 
				
			||||||
 | 
					                ), h(
 | 
				
			||||||
 | 
					                  'Button',
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    props: {
 | 
				
			||||||
 | 
					                      size: 'small',
 | 
				
			||||||
 | 
					                      type: 'error'
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    on: {
 | 
				
			||||||
 | 
					                      click: () => {
 | 
				
			||||||
 | 
					                        this.removeMessage(params.row.id);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                  '删除'
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            } else if (params.row.status === 'ALREADY_READY') {
 | 
				
			||||||
 | 
					              return h('div', [
 | 
				
			||||||
 | 
					                h(
 | 
				
			||||||
 | 
					                  'Button',
 | 
				
			||||||
 | 
					                  {
 | 
				
			||||||
 | 
					                    props: {
 | 
				
			||||||
 | 
					                      size: 'small',
 | 
				
			||||||
 | 
					                      type: 'error'
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    on: {
 | 
				
			||||||
 | 
					                      click: () => {
 | 
				
			||||||
 | 
					                        this.removeMessage(params.row.id);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                  '删除'
 | 
				
			||||||
 | 
					                )
 | 
				
			||||||
 | 
					              ]);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 消息状态发生变化
 | 
				
			||||||
 | 
					    statusChange (index) {
 | 
				
			||||||
 | 
					      if (index === 0) { this.params.status = 'UN_READY' }
 | 
				
			||||||
 | 
					      if (index === 1) { this.params.status = 'ALREADY_READY' }
 | 
				
			||||||
 | 
					      if (index === 2) { this.params.status = 'ALREADY_REMOVE' }
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 修改页码
 | 
				
			||||||
 | 
					    changePage (v) {
 | 
				
			||||||
 | 
					      this.params.pageNumber = v;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 修改页数
 | 
				
			||||||
 | 
					    changePageSize (v) {
 | 
				
			||||||
 | 
					      this.params.pageSize = v;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getList () { // 获取消息列表
 | 
					    getList () { // 获取消息列表
 | 
				
			||||||
      memberMsgList(this.params).then(res => {
 | 
					      memberMsgList(this.params).then(res => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.list = res.result.records;
 | 
					          this.messageData = res.result;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    setRead (id) { // 设置消息已读
 | 
					    // 设置消息已读
 | 
				
			||||||
 | 
					    setRead (id) {
 | 
				
			||||||
      readMemberMsg(id).then(res => {
 | 
					      readMemberMsg(id).then(res => {
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.getList()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 消息放入回收站
 | 
				
			||||||
 | 
					    removeMessage (id) {
 | 
				
			||||||
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
 | 
					        title: '确认删除',
 | 
				
			||||||
 | 
					        // 记得确认修改此处
 | 
				
			||||||
 | 
					        content: '确认要删除此消息?',
 | 
				
			||||||
 | 
					        loading: true,
 | 
				
			||||||
 | 
					        onOk: () => {
 | 
				
			||||||
 | 
					          // 删除
 | 
				
			||||||
 | 
					          delMemberMsg(id).then((res) => {
 | 
				
			||||||
 | 
					            this.$Modal.remove();
 | 
				
			||||||
 | 
					            if (res.success) {
 | 
				
			||||||
 | 
					              this.$Message.success('消息已成功放入回收站');
 | 
				
			||||||
 | 
					              this.getList();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
 | 
				
			|||||||
@ -112,7 +112,7 @@
 | 
				
			|||||||
      </Form>
 | 
					      </Form>
 | 
				
			||||||
      <div slot="footer">
 | 
					      <div slot="footer">
 | 
				
			||||||
        <Button type="text" @click="modalVisible = false">取消</Button>
 | 
					        <Button type="text" @click="modalVisible = false">取消</Button>
 | 
				
			||||||
        <Button type="primary" :loading="submitLoading" @click="lower(form.id)"
 | 
					        <Button type="primary" :loading="submitLoading" @click="lower"
 | 
				
			||||||
          >提交</Button
 | 
					          >提交</Button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -363,7 +363,7 @@ export default {
 | 
				
			|||||||
      this.modalTitle = "下架操作";
 | 
					      this.modalTitle = "下架操作";
 | 
				
			||||||
      this.modalVisible = true;
 | 
					      this.modalVisible = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    lower(id) {
 | 
					    lower() {
 | 
				
			||||||
      lowGoods(this.id, this.underForm).then((res) => {
 | 
					      lowGoods(this.id, this.underForm).then((res) => {
 | 
				
			||||||
        this.$Modal.remove();
 | 
					        this.$Modal.remove();
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
				
			|||||||
@ -80,7 +80,6 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      btnWay, // 按钮类型
 | 
					 | 
				
			||||||
      type: "full", // 展示方式
 | 
					      type: "full", // 展示方式
 | 
				
			||||||
      //全屏广告
 | 
					      //全屏广告
 | 
				
			||||||
      advertising: [
 | 
					      advertising: [
 | 
				
			||||||
 | 
				
			|||||||
@ -344,6 +344,7 @@ export default {
 | 
				
			|||||||
    callback(val, index) {
 | 
					    callback(val, index) {
 | 
				
			||||||
      this.$set(val, "___selected", !val.___selected);
 | 
					      this.$set(val, "___selected", !val.___selected);
 | 
				
			||||||
      console.log(val.___selected);
 | 
					      console.log(val.___selected);
 | 
				
			||||||
 | 
					      console.log(this.selectMember);
 | 
				
			||||||
      let findUser = this.selectMember.find((item) => {
 | 
					      let findUser = this.selectMember.find((item) => {
 | 
				
			||||||
        return item.id == val.id;
 | 
					        return item.id == val.id;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 | 
				
			|||||||
@ -137,7 +137,7 @@
 | 
				
			|||||||
              <Form-item label="订单类型" prop="orderType">
 | 
					              <Form-item label="订单类型" prop="orderType">
 | 
				
			||||||
                <Select v-model="orderSearchForm.orderType" placeholder="请选择" clearable style="width: 200px">
 | 
					                <Select v-model="orderSearchForm.orderType" placeholder="请选择" clearable style="width: 200px">
 | 
				
			||||||
                  <Option value="NORMAL">普通订单</Option>
 | 
					                  <Option value="NORMAL">普通订单</Option>
 | 
				
			||||||
                  <Option value="FICTITIOUS">虚拟订单</Option>
 | 
					                  <Option value="VIRTUAL">虚拟订单</Option>
 | 
				
			||||||
                  <Option value="GIFT">赠品订单</Option>
 | 
					                  <Option value="GIFT">赠品订单</Option>
 | 
				
			||||||
                  <Option value="PINTUAN">拼团订单</Option>
 | 
					                  <Option value="PINTUAN">拼团订单</Option>
 | 
				
			||||||
                </Select>
 | 
					                </Select>
 | 
				
			||||||
@ -479,7 +479,7 @@
 | 
				
			|||||||
            render: (h, params) => {
 | 
					            render: (h, params) => {
 | 
				
			||||||
              if (params.row.orderType == "NORMAL") {
 | 
					              if (params.row.orderType == "NORMAL") {
 | 
				
			||||||
                return h('div', [h('span', {}, '普通订单'),]);
 | 
					                return h('div', [h('span', {}, '普通订单'),]);
 | 
				
			||||||
              } else if (params.row.orderType == "FICTITIOUS") {
 | 
					              } else if (params.row.orderType == "VIRTUAL") {
 | 
				
			||||||
                return h('div', [h('span', {}, '虚拟订单'),]);
 | 
					                return h('div', [h('span', {}, '虚拟订单'),]);
 | 
				
			||||||
              } else if (params.row.orderType == "GIFT") {
 | 
					              } else if (params.row.orderType == "GIFT") {
 | 
				
			||||||
                return h('div', [h('span', {}, '赠品订单'),]);
 | 
					                return h('div', [h('span', {}, '赠品订单'),]);
 | 
				
			||||||
 | 
				
			|||||||
@ -27,13 +27,9 @@
 | 
				
			|||||||
                <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
 | 
					                <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">
 | 
				
			||||||
                  <Option value="NEW">新订单</Option>
 | 
					                  <Option value="NEW">新订单</Option>
 | 
				
			||||||
                  <Option value="CONFIRM">已确认</Option>
 | 
					                  <Option value="CONFIRM">已确认</Option>
 | 
				
			||||||
                  <Option value="STOCK_LOCK">库存锁定</Option>
 | 
					 | 
				
			||||||
                  <Option value="ERROR">出库失败</Option>
 | 
					 | 
				
			||||||
                  <Option value="WAIT_PINTUAN">待成团</Option>
 | 
					 | 
				
			||||||
                  <Option value="PAID">待发货</Option>
 | 
					 | 
				
			||||||
                  <Option value="DELIVERED">已发货</Option>
 | 
					 | 
				
			||||||
                  <Option value="COMPLETE">已完成</Option>
 | 
					 | 
				
			||||||
                  <Option value="TAKE">待核验</Option>
 | 
					                  <Option value="TAKE">待核验</Option>
 | 
				
			||||||
 | 
					                  <Option value="COMPLETE">已完成</Option>
 | 
				
			||||||
 | 
					                  <Option value="WAIT_PINTUAN">待成团</Option>
 | 
				
			||||||
                  <Option value="CANCELLED">已取消</Option>
 | 
					                  <Option value="CANCELLED">已取消</Option>
 | 
				
			||||||
                </Select>
 | 
					                </Select>
 | 
				
			||||||
              </Form-item>
 | 
					              </Form-item>
 | 
				
			||||||
@ -98,7 +94,7 @@
 | 
				
			|||||||
          order: "", // 默认排序方式
 | 
					          order: "", // 默认排序方式
 | 
				
			||||||
          startDate: "", // 起始时间
 | 
					          startDate: "", // 起始时间
 | 
				
			||||||
          endDate: "", // 终止时间
 | 
					          endDate: "", // 终止时间
 | 
				
			||||||
          orderType: "FICTITIOUS",
 | 
					          orderType: "VIRTUAL",
 | 
				
			||||||
          orderSn: "",
 | 
					          orderSn: "",
 | 
				
			||||||
          buyerName: "",
 | 
					          buyerName: "",
 | 
				
			||||||
          orderStatus: ""
 | 
					          orderStatus: ""
 | 
				
			||||||
@ -123,6 +119,19 @@
 | 
				
			|||||||
            title: "订单来源",
 | 
					            title: "订单来源",
 | 
				
			||||||
            key: "clientType",
 | 
					            key: "clientType",
 | 
				
			||||||
            width: 95,
 | 
					            width: 95,
 | 
				
			||||||
 | 
					            render: (h, params) => {
 | 
				
			||||||
 | 
					              if (params.row.clientType == "H5") {
 | 
				
			||||||
 | 
					                return h("div", {}, "移动端");
 | 
				
			||||||
 | 
					              } else if (params.row.clientType == "PC") {
 | 
				
			||||||
 | 
					                return h("div", {}, "PC端");
 | 
				
			||||||
 | 
					              } else if (params.row.clientType == "WECHAT_MP") {
 | 
				
			||||||
 | 
					                return h("div", {}, "小程序端");
 | 
				
			||||||
 | 
					              } else if (params.row.clientType == "APP") {
 | 
				
			||||||
 | 
					                return h("div", {}, "移动应用端");
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                return h("div", {}, params.row.clientType);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            title: "买家名称",
 | 
					            title: "买家名称",
 | 
				
			||||||
 | 
				
			|||||||
@ -171,7 +171,7 @@
 | 
				
			|||||||
                <div class="div-zoom">
 | 
					                <div class="div-zoom">
 | 
				
			||||||
                  <a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
 | 
					                  <a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <span v-for="(item, key) in JSON.parse(row.specs)">
 | 
					                <span v-for="(item, key) in JSON.parse(row.specs)" :key="key">
 | 
				
			||||||
                  <span v-show="key!='images'" style="font-size: 12px;color: #999999;">
 | 
					                  <span v-show="key!='images'" style="font-size: 12px;color: #999999;">
 | 
				
			||||||
                    {{key}} : {{item}}
 | 
					                    {{key}} : {{item}}
 | 
				
			||||||
                  </span>
 | 
					                  </span>
 | 
				
			||||||
@ -245,9 +245,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="modifyPriceSubmit"
 | 
					        <Button @click="modal = false">关闭</Button>
 | 
				
			||||||
          >调整</Button
 | 
					        <Button type="primary" @click="modifyPriceSubmit">调整</Button>
 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!-- 订单取消模态框 -->
 | 
					    <!-- 订单取消模态框 -->
 | 
				
			||||||
@ -275,9 +274,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="orderCancelSubmit"
 | 
					        <Button @click="orderCancelModal = false">关闭</Button>
 | 
				
			||||||
          >取消</Button
 | 
					        <Button type="primary" @click="orderCancelSubmit">确认</Button>
 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!--收件地址弹出框-->
 | 
					    <!--收件地址弹出框-->
 | 
				
			||||||
@ -340,8 +338,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="editAddressSubmit">修改</Button
 | 
					        <Button @click="addressModal = false">关闭</Button>
 | 
				
			||||||
        >
 | 
					        <Button type="primary" @click="editAddressSubmit">修改</Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!-- 订单日志 -->
 | 
					    <!-- 订单日志 -->
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,7 @@
 | 
				
			|||||||
                </FormItem>
 | 
					                </FormItem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <FormItem label="用户名:">
 | 
					                <FormItem label="用户名:">
 | 
				
			||||||
                  {{ userForm.memberName }}
 | 
					                  {{ userForm.username }}
 | 
				
			||||||
                </FormItem>
 | 
					                </FormItem>
 | 
				
			||||||
                <FormItem label="昵称:" prop="nickName">
 | 
					                <FormItem label="昵称:" prop="nickName">
 | 
				
			||||||
                  <Input v-model="userForm.nickName" style="width: 250px"/>
 | 
					                  <Input v-model="userForm.nickName" style="width: 250px"/>
 | 
				
			||||||
@ -50,25 +50,6 @@
 | 
				
			|||||||
                  <a @click="changePassword">修改</a>
 | 
					                  <a @click="changePassword">修改</a>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
              <!-- #TODO 这块目前好像没有这个功能 -->
 | 
					 | 
				
			||||||
              <!-- <div class="item">
 | 
					 | 
				
			||||||
                <div>
 | 
					 | 
				
			||||||
                  <div class="title">绑定手机</div>
 | 
					 | 
				
			||||||
                  <div class="desc">
 | 
					 | 
				
			||||||
                    <span v-if="userForm.mobile">已绑定手机:{{ userForm.mobile }}</span>
 | 
					 | 
				
			||||||
                    <span v-else>未绑定手机号</span>
 | 
					 | 
				
			||||||
                  </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
              </div>
 | 
					 | 
				
			||||||
              <div class="item">
 | 
					 | 
				
			||||||
                <div>
 | 
					 | 
				
			||||||
                  <div class="title">绑定邮箱</div>
 | 
					 | 
				
			||||||
                  <div class="desc">
 | 
					 | 
				
			||||||
                    <span v-if="userForm.email">已绑定邮箱:{{ userForm.email }}</span>
 | 
					 | 
				
			||||||
                    <span v-else>未绑定邮箱</span>
 | 
					 | 
				
			||||||
                  </div>
 | 
					 | 
				
			||||||
                </div>
 | 
					 | 
				
			||||||
              </div> -->
 | 
					 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -101,6 +82,7 @@ export default {
 | 
				
			|||||||
        avatar: "",
 | 
					        avatar: "",
 | 
				
			||||||
        nickname: ""
 | 
					        nickname: ""
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      saveLoading:false,//loading 状态
 | 
				
			||||||
      currMenu: "基本信息" // 当前菜单
 | 
					      currMenu: "基本信息" // 当前菜单
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -169,14 +169,16 @@
 | 
				
			|||||||
          <p class="item">
 | 
					          <p class="item">
 | 
				
			||||||
            <span class="label">结算周期:</span>
 | 
					            <span class="label">结算周期:</span>
 | 
				
			||||||
            <span class="info" v-if="storeInfo.settlementCycle">
 | 
					            <span class="info" v-if="storeInfo.settlementCycle">
 | 
				
			||||||
 | 
					              <template v-for="item in storeInfo.settlementCycle.split(',')">
 | 
				
			||||||
               <Tag
 | 
					               <Tag
 | 
				
			||||||
                 v-for="item in storeInfo.settlementCycle.split(',')"
 | 
					 | 
				
			||||||
                  :key="item"
 | 
					                  :key="item"
 | 
				
			||||||
                  v-if="item!==''"
 | 
					                  v-if="item!==''"
 | 
				
			||||||
                  :name="item"
 | 
					                  :name="item"
 | 
				
			||||||
                  style="marrgin-left: 10px"
 | 
					                  style="marrgin-left: 10px"
 | 
				
			||||||
                >{{ item }}
 | 
					                >{{ item }}
 | 
				
			||||||
                </Tag>
 | 
					                </Tag>
 | 
				
			||||||
 | 
					              </template>
 | 
				
			||||||
 | 
					               
 | 
				
			||||||
            </span>
 | 
					            </span>
 | 
				
			||||||
          </p>
 | 
					          </p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -217,7 +219,7 @@
 | 
				
			|||||||
              <Form-item label="订单类型" prop="orderType">
 | 
					              <Form-item label="订单类型" prop="orderType">
 | 
				
			||||||
                <Select v-model="orderSearchForm.orderType" placeholder="请选择" clearable style="width: 200px">
 | 
					                <Select v-model="orderSearchForm.orderType" placeholder="请选择" clearable style="width: 200px">
 | 
				
			||||||
                  <Option value="NORMAL">普通订单</Option>
 | 
					                  <Option value="NORMAL">普通订单</Option>
 | 
				
			||||||
                  <Option value="FICTITIOUS">虚拟订单</Option>
 | 
					                  <Option value="VIRTUAL">虚拟订单</Option>
 | 
				
			||||||
                  <Option value="GIFT">赠品订单</Option>
 | 
					                  <Option value="GIFT">赠品订单</Option>
 | 
				
			||||||
                  <Option value="PINTUAN">拼团订单</Option>
 | 
					                  <Option value="PINTUAN">拼团订单</Option>
 | 
				
			||||||
                </Select>
 | 
					                </Select>
 | 
				
			||||||
@ -577,7 +579,7 @@
 | 
				
			|||||||
            render: (h, params) => {
 | 
					            render: (h, params) => {
 | 
				
			||||||
              if (params.row.orderType == "NORMAL") {
 | 
					              if (params.row.orderType == "NORMAL") {
 | 
				
			||||||
                return h('div', [h('span', {}, '普通订单'),]);
 | 
					                return h('div', [h('span', {}, '普通订单'),]);
 | 
				
			||||||
              } else if (params.row.orderType == "FICTITIOUS") {
 | 
					              } else if (params.row.orderType == "VIRTUAL") {
 | 
				
			||||||
                return h('div', [h('span', {}, '虚拟订单'),]);
 | 
					                return h('div', [h('span', {}, '虚拟订单'),]);
 | 
				
			||||||
              } else if (params.row.orderType == "GIFT") {
 | 
					              } else if (params.row.orderType == "GIFT") {
 | 
				
			||||||
                return h('div', [h('span', {}, '赠品订单'),]);
 | 
					                return h('div', [h('span', {}, '赠品订单'),]);
 | 
				
			||||||
 | 
				
			|||||||
@ -423,7 +423,7 @@ div.base-info-item {
 | 
				
			|||||||
  display:flex;
 | 
					  display:flex;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.demo-upload-list-cover div {
 | 
					.demo-upload-list-cover div {
 | 
				
			||||||
  margin: 10% 0;
 | 
					  margin-top: 50px;
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  > i {
 | 
					  > i {
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,7 @@
 | 
				
			|||||||
            <DropdownItem name="uppers">批量上架</DropdownItem>
 | 
					            <DropdownItem name="uppers">批量上架</DropdownItem>
 | 
				
			||||||
            <DropdownItem name="lowers">批量下架</DropdownItem>
 | 
					            <DropdownItem name="lowers">批量下架</DropdownItem>
 | 
				
			||||||
            <DropdownItem name="deleteAll">批量删除</DropdownItem>
 | 
					            <DropdownItem name="deleteAll">批量删除</DropdownItem>
 | 
				
			||||||
            <DropdownItem name="batchShipTemplate">批量设置运费模板</DropdownItem>
 | 
					            <DropdownItem name="batchShipTemplate">批量设置物流模板</DropdownItem>
 | 
				
			||||||
          </DropdownMenu>
 | 
					          </DropdownMenu>
 | 
				
			||||||
        </Dropdown>
 | 
					        </Dropdown>
 | 
				
			||||||
      </Row>
 | 
					      </Row>
 | 
				
			||||||
@ -87,21 +87,10 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 批量设置运费模板 -->
 | 
					    <!-- 批量设置物流模板 -->
 | 
				
			||||||
    <Modal title="批量设置运费模板" v-model="shipTemplateModal" :mask-closable="false" :width="500">
 | 
					    <Modal title="批量设置物流模板" v-model="shipTemplateModal" :mask-closable="false" :width="500">
 | 
				
			||||||
      <Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
 | 
					      <Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
 | 
				
			||||||
        <FormItem class="form-item-view-el" label="运费" prop="freightPayer">
 | 
					        <FormItem class="form-item-view-el" label="物流模板" prop="templateId">
 | 
				
			||||||
          <RadioGroup type="button" button-style="solid" @on-change="logisticsTemplateUndertakerChange" v-model="shipTemplateForm.freightPayer">
 | 
					 | 
				
			||||||
            <Radio label="STORE">
 | 
					 | 
				
			||||||
              <span>卖家承担运费</span>
 | 
					 | 
				
			||||||
            </Radio>
 | 
					 | 
				
			||||||
            <Radio label="BUYER">
 | 
					 | 
				
			||||||
              <span>使用物流规则</span>
 | 
					 | 
				
			||||||
            </Radio>
 | 
					 | 
				
			||||||
          </RadioGroup>
 | 
					 | 
				
			||||||
        </FormItem>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <FormItem class="form-item-view-el" label="物流模板" prop="templateId" v-if="shipTemplateShow">
 | 
					 | 
				
			||||||
          <Select v-model="shipTemplateForm.templateId" style="width: 200px">
 | 
					          <Select v-model="shipTemplateForm.templateId" style="width: 200px">
 | 
				
			||||||
            <Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id">{{ item.name }}
 | 
					            <Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id">{{ item.name }}
 | 
				
			||||||
            </Option>
 | 
					            </Option>
 | 
				
			||||||
@ -124,10 +113,9 @@ import {
 | 
				
			|||||||
  upGoods,
 | 
					  upGoods,
 | 
				
			||||||
  lowGoods,
 | 
					  lowGoods,
 | 
				
			||||||
  deleteGoods,
 | 
					  deleteGoods,
 | 
				
			||||||
  batchShipTemplate,
 | 
					  batchShipTemplate
 | 
				
			||||||
} from "@/api/goods";
 | 
					} from "@/api/goods";
 | 
				
			||||||
 | 
					import * as API_Shop from "@/api/shops";
 | 
				
			||||||
import * as API_Store from "@/api/shops";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "goods",
 | 
					  name: "goods",
 | 
				
			||||||
@ -135,10 +123,7 @@ export default {
 | 
				
			|||||||
    return {
 | 
					    return {
 | 
				
			||||||
      id: "", //要操作的id
 | 
					      id: "", //要操作的id
 | 
				
			||||||
      loading: true, // 表单加载状态
 | 
					      loading: true, // 表单加载状态
 | 
				
			||||||
      shipTemplateForm: {
 | 
					      shipTemplateForm: {},
 | 
				
			||||||
        freightPayer: "STORE",
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      shipTemplateShow: false, //物流模板是否显示
 | 
					 | 
				
			||||||
      shipTemplateModal: false, // 物流模板是否显示
 | 
					      shipTemplateModal: false, // 物流模板是否显示
 | 
				
			||||||
      logisticsTemplate: [], // 物流列表
 | 
					      logisticsTemplate: [], // 物流列表
 | 
				
			||||||
      updateStockModalVisible: false, // 更新库存模态框显隐
 | 
					      updateStockModalVisible: false, // 更新库存模态框显隐
 | 
				
			||||||
@ -421,11 +406,12 @@ export default {
 | 
				
			|||||||
      if (v == "deleteAll") {
 | 
					      if (v == "deleteAll") {
 | 
				
			||||||
        this.deleteAll();
 | 
					        this.deleteAll();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      //批量设置运费模板
 | 
					      //批量设置物流模板
 | 
				
			||||||
      if (v == "batchShipTemplate") {
 | 
					      if (v == "batchShipTemplate") {
 | 
				
			||||||
        this.batchShipTemplate();
 | 
					        this.batchShipTemplate();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取库存详情
 | 
				
			||||||
    getStockDetail(id) {
 | 
					    getStockDetail(id) {
 | 
				
			||||||
      getGoodsSkuListDataSeller({ goodsId: id, pageSize: 1000 }).then((res) => {
 | 
					      getGoodsSkuListDataSeller({ goodsId: id, pageSize: 1000 }).then((res) => {
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
@ -435,6 +421,7 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 更新库存
 | 
				
			||||||
    updateStock() {
 | 
					    updateStock() {
 | 
				
			||||||
      let updateStockList = this.stockList.map((i) => {
 | 
					      let updateStockList = this.stockList.map((i) => {
 | 
				
			||||||
        let j = { skuId: i.id, quantity: i.quantity };
 | 
					        let j = { skuId: i.id, quantity: i.quantity };
 | 
				
			||||||
@ -486,28 +473,24 @@ export default {
 | 
				
			|||||||
      this.selectList = e;
 | 
					      this.selectList = e;
 | 
				
			||||||
      this.selectCount = e.length;
 | 
					      this.selectCount = e.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //保存运费模板信息
 | 
					    //保存物流模板信息
 | 
				
			||||||
    saveShipTemplate() {
 | 
					    saveShipTemplate() {
 | 
				
			||||||
      if (this.shipTemplateForm.freightPayer == "STORE") {
 | 
					     
 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          this.shipTemplateForm.templateId = 0;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
        title: "确认设置运费模板",
 | 
					        title: "确认设置物流模板",
 | 
				
			||||||
        content:
 | 
					        content:
 | 
				
			||||||
          "您确认要设置所选的 " + this.selectCount + " 个商品的运费模板?",
 | 
					          "您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
 | 
				
			||||||
        loading: true,
 | 
					        loading: true,
 | 
				
			||||||
        onOk: () => {
 | 
					        onOk: () => {
 | 
				
			||||||
          let ids = [];
 | 
					          let ids = [];
 | 
				
			||||||
          this.selectList.forEach(function (e) {
 | 
					          this.selectList.forEach(function (e) {
 | 
				
			||||||
            ids.push(e.id);
 | 
					            ids.push(e.id);
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
          // 批量设置运费模板
 | 
					          // 批量设置物流模板
 | 
				
			||||||
          batchShipTemplate(this.shipTemplateForm).then((res) => {
 | 
					          batchShipTemplate(this.shipTemplateForm).then((res) => {
 | 
				
			||||||
            this.$Modal.remove();
 | 
					            this.$Modal.remove();
 | 
				
			||||||
            if (res.success) {
 | 
					            if (res.success) {
 | 
				
			||||||
              this.$Message.success("运费模板设置成功");
 | 
					              this.$Message.success("物流模板设置成功");
 | 
				
			||||||
              this.clearSelectAll();
 | 
					              this.clearSelectAll();
 | 
				
			||||||
              this.getDataList();
 | 
					              this.getDataList();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -516,12 +499,13 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //批量设置运费模板
 | 
					    //批量设置物流模板
 | 
				
			||||||
    batchShipTemplate() {
 | 
					    batchShipTemplate() {
 | 
				
			||||||
      if (this.selectCount <= 0) {
 | 
					      if (this.selectCount <= 0) {
 | 
				
			||||||
        this.$Message.warning("您还未选择要设置运费模板的商品");
 | 
					        this.$Message.warning("您还未选择要设置物流模板的商品");
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      this.getShipTempList()
 | 
				
			||||||
      let data = [];
 | 
					      let data = [];
 | 
				
			||||||
      this.selectList.forEach(function (e) {
 | 
					      this.selectList.forEach(function (e) {
 | 
				
			||||||
        data.push(e.id);
 | 
					        data.push(e.id);
 | 
				
			||||||
@ -529,21 +513,7 @@ export default {
 | 
				
			|||||||
      this.shipTemplateForm.goodsId = data;
 | 
					      this.shipTemplateForm.goodsId = data;
 | 
				
			||||||
      this.shipTemplateModal = true;
 | 
					      this.shipTemplateModal = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //运费承担者变化
 | 
					    // 获取商品列表数据
 | 
				
			||||||
    logisticsTemplateUndertakerChange(v) {
 | 
					 | 
				
			||||||
      //如果是卖家承担运费 需要显示运费模板
 | 
					 | 
				
			||||||
      if (v == "BUYER") {
 | 
					 | 
				
			||||||
        API_Store.getShipTemplate().then((res) => {
 | 
					 | 
				
			||||||
          if (res.success) {
 | 
					 | 
				
			||||||
            this.logisticsTemplate = res.result;
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        this.shipTemplateShow = true;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      if (v == "STORE") {
 | 
					 | 
				
			||||||
        this.shipTemplateShow = false;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					    getDataList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      // 带多条件搜索参数获取表单数据
 | 
					      // 带多条件搜索参数获取表单数据
 | 
				
			||||||
@ -555,6 +525,14 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取物流模板
 | 
				
			||||||
 | 
					    getShipTempList () {
 | 
				
			||||||
 | 
					      API_Shop.getShipTemplate().then((res) => {
 | 
				
			||||||
 | 
					        if (res.success) {
 | 
				
			||||||
 | 
					          this.logisticsTemplate = res.result;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    //下架商品
 | 
					    //下架商品
 | 
				
			||||||
    lower(v) {
 | 
					    lower(v) {
 | 
				
			||||||
      this.$Modal.confirm({
 | 
					      this.$Modal.confirm({
 | 
				
			||||||
 | 
				
			|||||||
@ -137,27 +137,33 @@
 | 
				
			|||||||
              <Input type="text" v-model="baseInfoForm.cost" placeholder="市场价格" clearable style="width: 260px"/>
 | 
					              <Input type="text" v-model="baseInfoForm.cost" placeholder="市场价格" clearable style="width: 260px"/>
 | 
				
			||||||
            </FormItem>
 | 
					            </FormItem>
 | 
				
			||||||
            <FormItem class="form-item-view-el required" label="商品图片" prop="goodsGalleryFiles">
 | 
					            <FormItem class="form-item-view-el required" label="商品图片" prop="goodsGalleryFiles">
 | 
				
			||||||
 | 
					              <vuedraggable
 | 
				
			||||||
 | 
					                :list="baseInfoForm.goodsGalleryFiles"
 | 
				
			||||||
 | 
					                :animation="200"
 | 
				
			||||||
 | 
					                style="display:inline-block;"
 | 
				
			||||||
 | 
					                ghost-class="thumb-ghost"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
                <div class="demo-upload-list" v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index">
 | 
					                <div class="demo-upload-list" v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index">
 | 
				
			||||||
                  <template v-if="item.status === 'finished'">
 | 
					                  <template v-if="item.status === 'finished'">
 | 
				
			||||||
                    <img :src="item.url"/>
 | 
					                    <img :src="item.url"/>
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <div class="demo-upload-list-cover">
 | 
					                    <div class="demo-upload-list-cover">
 | 
				
			||||||
                      <div>
 | 
					                      <div>
 | 
				
			||||||
                      <Icon type="ios-eye-outline" @click.native="handleViewGoodsPicture(item.url)"></Icon>
 | 
					                        <Icon type="ios-eye-outline" size="30" @click.native="handleViewGoodsPicture(item.url)"></Icon>
 | 
				
			||||||
                      <Icon type="ios-trash-outline" @click.native="handleRemoveGoodsPicture(item)"></Icon>
 | 
					                        <Icon type="ios-trash-outline" size="30" @click.native="handleRemoveGoodsPicture(item)"></Icon>
 | 
				
			||||||
                      </div>
 | 
					                      </div>
 | 
				
			||||||
                    <div>
 | 
					                      <!-- <div>
 | 
				
			||||||
                        <Icon type="ios-arrow-dropleft" @click.native="
 | 
					                        <Icon type="ios-arrow-dropleft" @click.native="
 | 
				
			||||||
                          handleGoodsPicRemoteUp(baseInfoForm.goodsGalleryFiles,__index)"/>
 | 
					                          handleGoodsPicRemoteUp(baseInfoForm.goodsGalleryFiles,__index)"/>
 | 
				
			||||||
                        <Icon type="ios-arrow-dropright" @click.native="
 | 
					                        <Icon type="ios-arrow-dropright" @click.native="
 | 
				
			||||||
                          handleGoodsPicRemoteDown(baseInfoForm.goodsGalleryFiles,__index)"/>
 | 
					                          handleGoodsPicRemoteDown(baseInfoForm.goodsGalleryFiles,__index)"/>
 | 
				
			||||||
                    </div>
 | 
					                      </div> -->
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                  </template>
 | 
					                  </template>
 | 
				
			||||||
                  <template v-else>
 | 
					                  <template v-else>
 | 
				
			||||||
                    <Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
 | 
					                    <Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
 | 
				
			||||||
                  </template>
 | 
					                  </template>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					              </vuedraggable>
 | 
				
			||||||
              <Upload ref="upload" :show-upload-list="false" :default-file-list="baseInfoForm.goodsGalleryFiles"
 | 
					              <Upload ref="upload" :show-upload-list="false" :default-file-list="baseInfoForm.goodsGalleryFiles"
 | 
				
			||||||
                      :on-success="handleSuccessGoodsPicture" :format="['jpg', 'jpeg', 'png']"
 | 
					                      :on-success="handleSuccessGoodsPicture" :format="['jpg', 'jpeg', 'png']"
 | 
				
			||||||
                      :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize"
 | 
					                      :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize"
 | 
				
			||||||
@ -167,6 +173,7 @@
 | 
				
			|||||||
                  <Icon type="ios-camera" size="20"></Icon>
 | 
					                  <Icon type="ios-camera" size="20"></Icon>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
              </Upload>
 | 
					              </Upload>
 | 
				
			||||||
 | 
					              <!-- <upload-pic-thumb v-model="baseInfoForm.goodsGalleryFiles" :multiple="true"></upload-pic-thumb> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              <Modal title="View Image" v-model="goodsPictureVisible">
 | 
					              <Modal title="View Image" v-model="goodsPictureVisible">
 | 
				
			||||||
                <img :src="previewGoodsPicture" v-if="goodsPictureVisible" style="width: 100%"/>
 | 
					                <img :src="previewGoodsPicture" v-if="goodsPictureVisible" style="width: 100%"/>
 | 
				
			||||||
@ -371,7 +378,7 @@
 | 
				
			|||||||
                      <Select v-model="params.paramValue" placeholder="请选择" style="width: 200px" clearable
 | 
					                      <Select v-model="params.paramValue" placeholder="请选择" style="width: 200px" clearable
 | 
				
			||||||
                              @on-change="selectParams(paramsGroup,groupIndex,params,paramsIndex,params.paramValue)">
 | 
					                              @on-change="selectParams(paramsGroup,groupIndex,params,paramsIndex,params.paramValue)">
 | 
				
			||||||
                        <Option v-for="option in params.options.split(',')" :label="option"
 | 
					                        <Option v-for="option in params.options.split(',')" :label="option"
 | 
				
			||||||
                                :value="option"></Option>
 | 
					                                :value="option" :key="option"></Option>
 | 
				
			||||||
                      </Select>
 | 
					                      </Select>
 | 
				
			||||||
                    </FormItem>
 | 
					                    </FormItem>
 | 
				
			||||||
                  </p>
 | 
					                  </p>
 | 
				
			||||||
@ -428,18 +435,17 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import {regular} from "@/utils";
 | 
					import {regular} from "@/utils";
 | 
				
			||||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
 | 
					 | 
				
			||||||
import editor from "@/views/my-components/lili/editor";
 | 
					import editor from "@/views/my-components/lili/editor";
 | 
				
			||||||
import * as API_GOODS from "@/api/goods";
 | 
					import * as API_GOODS from "@/api/goods";
 | 
				
			||||||
import * as API_Shop from "@/api/shops";
 | 
					import * as API_Shop from "@/api/shops";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cloneObj from "@/utils/index";
 | 
					import cloneObj from "@/utils/index";
 | 
				
			||||||
 | 
					import vuedraggable from "vuedraggable";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "addGoods",
 | 
					  name: "addGoods",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    uploadPicThumb,
 | 
					 | 
				
			||||||
    editor,
 | 
					    editor,
 | 
				
			||||||
 | 
					    vuedraggable
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    selectGoodsType: {
 | 
					    selectGoodsType: {
 | 
				
			||||||
@ -620,7 +626,7 @@ export default {
 | 
				
			|||||||
        updateSku: true,
 | 
					        updateSku: true,
 | 
				
			||||||
        /** 是否重新生成sku */
 | 
					        /** 是否重新生成sku */
 | 
				
			||||||
        regeneratorSkuFlag: false,
 | 
					        regeneratorSkuFlag: false,
 | 
				
			||||||
        /** 运费模板id **/
 | 
					        /** 物流模板id **/
 | 
				
			||||||
        templateId: '',
 | 
					        templateId: '',
 | 
				
			||||||
        /** 参数组*/
 | 
					        /** 参数组*/
 | 
				
			||||||
        goodsParamsDTOList: [],
 | 
					        goodsParamsDTOList: [],
 | 
				
			||||||
@ -647,7 +653,7 @@ export default {
 | 
				
			|||||||
      /** 规格图片 */
 | 
					      /** 规格图片 */
 | 
				
			||||||
      images: [],
 | 
					      images: [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      /** 运费模板 **/
 | 
					      /** 物流模板 **/
 | 
				
			||||||
      logisticsTemplate: [],
 | 
					      logisticsTemplate: [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      /** 固定列校验提示内容 */
 | 
					      /** 固定列校验提示内容 */
 | 
				
			||||||
@ -716,7 +722,7 @@ export default {
 | 
				
			|||||||
    this.accessToken = {
 | 
					    this.accessToken = {
 | 
				
			||||||
      accessToken: this.getStore("accessToken"),
 | 
					      accessToken: this.getStore("accessToken"),
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    // 获取运费模板
 | 
					    // 获取物流模板
 | 
				
			||||||
    API_Shop.getShipTemplate().then((res) => {
 | 
					    API_Shop.getShipTemplate().then((res) => {
 | 
				
			||||||
      if (res.success) {
 | 
					      if (res.success) {
 | 
				
			||||||
        this.logisticsTemplate = res.result;
 | 
					        this.logisticsTemplate = res.result;
 | 
				
			||||||
@ -838,7 +844,6 @@ export default {
 | 
				
			|||||||
     * @value 参数选项值
 | 
					     * @value 参数选项值
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    selectParams(paramsGroup, groupIndex, params, paramsIndex, value) {
 | 
					    selectParams(paramsGroup, groupIndex, params, paramsIndex, value) {
 | 
				
			||||||
      console.log(params.id);
 | 
					 | 
				
			||||||
      if (!this.baseInfoForm.goodsParamsDTOList[groupIndex]) {
 | 
					      if (!this.baseInfoForm.goodsParamsDTOList[groupIndex]) {
 | 
				
			||||||
        this.baseInfoForm.goodsParamsDTOList[groupIndex] = {
 | 
					        this.baseInfoForm.goodsParamsDTOList[groupIndex] = {
 | 
				
			||||||
          groupId:'',
 | 
					          groupId:'',
 | 
				
			||||||
@ -872,7 +877,6 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // 编辑sku图片
 | 
					    // 编辑sku图片
 | 
				
			||||||
    editSkuPicture(row) {
 | 
					    editSkuPicture(row) {
 | 
				
			||||||
      console.log(row);
 | 
					 | 
				
			||||||
      if (row.images && row.images.length > 0) {
 | 
					      if (row.images && row.images.length > 0) {
 | 
				
			||||||
        this.previewPicture = row.images[0].url;
 | 
					        this.previewPicture = row.images[0].url;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -938,7 +942,6 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleBeforeUploadGoodsPicture() {
 | 
					    handleBeforeUploadGoodsPicture() {
 | 
				
			||||||
      console.log(this.baseInfoForm);
 | 
					 | 
				
			||||||
      const check = this.baseInfoForm.goodsGalleryFiles.length < 5;
 | 
					      const check = this.baseInfoForm.goodsGalleryFiles.length < 5;
 | 
				
			||||||
      if (!check) {
 | 
					      if (!check) {
 | 
				
			||||||
        this.$Notice.warning({
 | 
					        this.$Notice.warning({
 | 
				
			||||||
@ -1017,7 +1020,6 @@ export default {
 | 
				
			|||||||
        ...this.baseInfoForm,
 | 
					        ...this.baseInfoForm,
 | 
				
			||||||
        ...response.result,
 | 
					        ...response.result,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      // console.warn(this.baseInfoForm);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.baseInfoForm.release = "true";
 | 
					      this.baseInfoForm.release = "true";
 | 
				
			||||||
      this.baseInfoForm.recommend = this.baseInfoForm.recommend
 | 
					      this.baseInfoForm.recommend = this.baseInfoForm.recommend
 | 
				
			||||||
@ -1141,7 +1143,6 @@ export default {
 | 
				
			|||||||
              group.goodsParamsItemDTOList.forEach(param => {
 | 
					              group.goodsParamsItemDTOList.forEach(param => {
 | 
				
			||||||
                param.groupId = group.groupId
 | 
					                param.groupId = group.groupId
 | 
				
			||||||
                paramsArr.push(param)
 | 
					                paramsArr.push(param)
 | 
				
			||||||
                console.log(param);
 | 
					 | 
				
			||||||
              })
 | 
					              })
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
            // 循环参数分组
 | 
					            // 循环参数分组
 | 
				
			||||||
@ -1155,7 +1156,6 @@ export default {
 | 
				
			|||||||
                })
 | 
					                })
 | 
				
			||||||
              })
 | 
					              })
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            console.log(this.goodsParams);
 | 
					 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            this.baseInfoForm.goodsParamsDTOList = []
 | 
					            this.baseInfoForm.goodsParamsDTOList = []
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
@ -1184,10 +1184,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 编辑规格值
 | 
					    // 编辑规格值
 | 
				
			||||||
    async skuValueChange(val, index, item) {
 | 
					    async skuValueChange(val, index, item) {
 | 
				
			||||||
      /** 更新skuInfo数据 */
 | 
					 
 | 
				
			||||||
      // let _arr = cloneObj(item);
 | 
					 | 
				
			||||||
      // this.$set(item, "name", _arr.name);
 | 
					 | 
				
			||||||
      // this.$set(this.skuInfo, index, _arr);
 | 
					 | 
				
			||||||
      /**
 | 
					      /**
 | 
				
			||||||
       * 渲染规格详细表格
 | 
					       * 渲染规格详细表格
 | 
				
			||||||
       */
 | 
					       */
 | 
				
			||||||
@ -1309,7 +1306,6 @@ export default {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.skuTableColumn = pushData;
 | 
					      this.skuTableColumn = pushData;
 | 
				
			||||||
      console.log(this.skuTableColumn);
 | 
					 | 
				
			||||||
      //克隆所有渲染的数据
 | 
					      //克隆所有渲染的数据
 | 
				
			||||||
      let cloneTemp = cloneObj(this.skuInfo);
 | 
					      let cloneTemp = cloneObj(this.skuInfo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1329,7 +1325,6 @@ export default {
 | 
				
			|||||||
        cloneTemp.splice(0, 1);
 | 
					        cloneTemp.splice(0, 1);
 | 
				
			||||||
        result = this.specIterator(result, cloneTemp);
 | 
					        result = this.specIterator(result, cloneTemp);
 | 
				
			||||||
        this.skuTableData = result;
 | 
					        this.skuTableData = result;
 | 
				
			||||||
        console.log(this.skuTableData);
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
     /**
 | 
					     /**
 | 
				
			||||||
@ -1459,7 +1454,6 @@ export default {
 | 
				
			|||||||
        this.GET_GoodData();
 | 
					        this.GET_GoodData();
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log(this.baseInfoForm);
 | 
					 | 
				
			||||||
      this.GET_GoodsParams();
 | 
					      this.GET_GoodsParams();
 | 
				
			||||||
      /** 1级校验 */
 | 
					      /** 1级校验 */
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
@ -1582,7 +1576,6 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
          /** 参数校验 **/
 | 
					          /** 参数校验 **/
 | 
				
			||||||
          /* Object.keys(this.baseInfoForm.goodsParamsList).forEach((item) => {
 | 
					          /* Object.keys(this.baseInfoForm.goodsParamsList).forEach((item) => {
 | 
				
			||||||
            console.warn(item.paramName)
 | 
					 | 
				
			||||||
          });*/
 | 
					          });*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (this.goodsId) {
 | 
					          if (this.goodsId) {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,8 +3,7 @@
 | 
				
			|||||||
    <Card style="height: 60px">
 | 
					    <Card style="height: 60px">
 | 
				
			||||||
      <div style="">
 | 
					      <div style="">
 | 
				
			||||||
        <Button v-if="allowOperation.editPrice" @click="modifyPrice" type="primary">调整价格</Button>
 | 
					        <Button v-if="allowOperation.editPrice" @click="modifyPrice" type="primary">调整价格</Button>
 | 
				
			||||||
        <Button v-if="allowOperation.editConsignee" @click="editAddress" type="primary">修改收货地址
 | 
					        <Button v-if="allowOperation.editConsignee" @click="editAddress" type="primary">修改收货地址</Button>
 | 
				
			||||||
        </Button>
 | 
					 | 
				
			||||||
        <Button v-if="allowOperation.showLogistics" @click="logistics" type="primary">查看物流</Button>
 | 
					        <Button v-if="allowOperation.showLogistics" @click="logistics" type="primary">查看物流</Button>
 | 
				
			||||||
        <Button @click="orderLog" type="primary">订单日志</Button>
 | 
					        <Button @click="orderLog" type="primary">订单日志</Button>
 | 
				
			||||||
        <Button v-if="allowOperation.take" @click="orderTake" type="primary">订单核销</Button>
 | 
					        <Button v-if="allowOperation.take" @click="orderTake" type="primary">订单核销</Button>
 | 
				
			||||||
@ -181,7 +180,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="modifyPriceSubmit">调整</Button>
 | 
					        <Button @click="modal = false">关闭</Button>
 | 
				
			||||||
 | 
					        <Button type="primary" @click="modifyPriceSubmit">调整</Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!--收件地址弹出框-->
 | 
					    <!--收件地址弹出框-->
 | 
				
			||||||
@ -210,7 +210,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="editAddressSubmit">修改</Button>
 | 
					        <Button @click="addressModal = false">关闭</Button>
 | 
				
			||||||
 | 
					        <Button type="primary" @click="editAddressSubmit">修改</Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!-- 订单核销 -->
 | 
					    <!-- 订单核销 -->
 | 
				
			||||||
@ -227,7 +228,8 @@
 | 
				
			|||||||
        </Form>
 | 
					        </Form>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button type="success" size="large" @click="orderTakeSubmit">核销</Button>
 | 
					        <Button @click="orderTakeModal = false">关闭</Button>
 | 
				
			||||||
 | 
					        <Button type="primary" @click="orderTakeSubmit">核销</Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
    <!-- 订单日志 -->
 | 
					    <!-- 订单日志 -->
 | 
				
			||||||
@ -303,8 +305,8 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <div slot="footer" style="text-align: right">
 | 
					      <div slot="footer" style="text-align: right">
 | 
				
			||||||
        <Button size="large" @click="orderDeliverHandelCancel">取消</Button>
 | 
					        <Button  @click="orderDeliverModal = false">关闭</Button>
 | 
				
			||||||
        <Button type="success" size="large" @click="orderDeliverySubmit">发货</Button>
 | 
					        <Button type="primary" @click="orderDeliverySubmit">发货</Button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </Modal>
 | 
					    </Modal>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@ -600,10 +602,6 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //订单日志取消
 | 
					 | 
				
			||||||
    orderDeliverHandelCancel() {
 | 
					 | 
				
			||||||
      this.orderDeliverModal = false;
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //订单发货提交
 | 
					    //订单发货提交
 | 
				
			||||||
    orderDeliverySubmit() {
 | 
					    orderDeliverySubmit() {
 | 
				
			||||||
      this.$refs.orderDeliveryForm.validate((valid) => {
 | 
					      this.$refs.orderDeliveryForm.validate((valid) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user