zhanghua
3 天以前 4f2e99d36d44d83befa607bc26cf1bf9b0bfcb6f
Merge branch 'dev' of http://42.193.1.25:9521/r/lmk-shop-web into dev
2个文件已修改
60 ■■■■ 已修改文件
manager/src/views/video/VideoList.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
seller/src/views/order/order/orderDetail.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager/src/views/video/VideoList.vue
@@ -462,7 +462,7 @@
            <Col>
              <FormItem :label-width="70" label="开始时间:" prop="startTime">
                <DatePicker
                  :v-model="commentForm.startTime"
                  v-model="commentForm.startTime"
                  type="datetime"
                  placeholder="选择开始时间"
                  style="width: 120px"
@@ -474,7 +474,7 @@
            <Col>
              <FormItem :label-width="70" label="结束时间:" prop="endTime">
                <DatePicker
                  :v-model="commentForm.endTime"
                  v-model="commentForm.endTime"
                  type="datetime"
                  placeholder="选择结束时间"
                  style="width: 120px"
@@ -487,8 +487,7 @@
        </Form>
      <div slot="footer">
        <Button type="text" @click="closeVideoDown">关闭</Button>
        <Button type="primary" @click="videoDown">确认</Button>
        <Button type="text" @click="closeComment">关闭</Button>
      </div>
          <Table
            :loading="commentLoading"
@@ -517,9 +516,7 @@
            show-sizer
          ></Page>
        </Row>
        <div slot="footer">
        </div>
      </Modal>
      <Modal
@@ -879,6 +876,9 @@
    this.getTags('')
  },
  methods: {
    closeComment(){
      this.showVideoComment = false
    },
    commentChangePage(page) {
      this.commentForm.pageNumber = page
      this.commentPage()
@@ -891,8 +891,14 @@
      this.commentPage()
    },
    commentPage(){
      //转换为字符串
      let startTime = this.formatDate(this.commentForm.startTime);
      let endTime = this.formatDate(this.commentForm.endTime);
      let from = {...this.commentForm};
      from.startTime = startTime;
      from.endTime = endTime;
      this.commentLoading = true;
      getCommentPage(this.commentForm).then(res =>{
      getCommentPage(from).then(res =>{
        this.commentLoading = false;
        if (res.code === 200){
          this.commentData = res.data;
@@ -938,6 +944,7 @@
      // this.selectCount = selection.length
    },
    openComment(row){
      this.$refs.commentForm.resetFields();
      console.log(row)
      this.commentForm.videoId = row.id;
      this.showVideoComment = true;
seller/src/views/order/order/orderDetail.vue
@@ -807,6 +807,7 @@
      // 分包裹发货
      groupShipModal: false,
      groupShipModalOpened: false, // 标识分包裹发货弹窗是否已打开过
      shipLoading: true,
      groupOrderDeliveryForm: {
        logisticsNo: "", //发货单号
@@ -857,11 +858,19 @@
  methods: {
    // 选中
    selectGroupShipGoodsMethods (selected) {
      console.log('selectGroupShipGoodsMethods被调用, selected:', JSON.stringify(selected));
      // 简化逻辑,直接保存选中的商品,数量在提交时从data数组获取
      this.selectGroupShipGoods = selected;
      console.log('selectGroupShipGoods已更新');
    },
    // 分包裹发货
    groupShip () {
      this.groupShipModal = true;
      this.groupShipModalOpened = true; // 标记弹窗已打开
      this.groupOrderDeliveryForm = {
        logisticsNo: "", //发货单号
        logisticsId: "", //物流公司
      }
      this.getLogisticsList();
    },
    // 分页获取物流公司
@@ -874,6 +883,7 @@
    },
    // 分包裹发货
    confirmShipGroupGoods () {
      console.log('表单原始数据--------------------------》',JSON.stringify(this.selectGroupShipGoods))
      this.$refs.groupOrderDeliveryForm.validate(async (valid) => {
        if (valid) {
          if (this.selectGroupShipGoods.length) {
@@ -881,16 +891,33 @@
              ...this.groupOrderDeliveryForm,
              orderSn: this.sn,
              partDeliveryDTOList: this.selectGroupShipGoods.map((item) => {
                // 直接从data数组中获取最新的canNum值,而不依赖选择时的数据
                const currentDataItem = this.data.find(d => d.id === item.id);
                const finalDeliveryNum = currentDataItem ? currentDataItem.canNum : item.num;
                console.log('处理商品项:', {
                  id: item.id,
                  selectedCanNum: item.canNum,
                  dataCanNum: currentDataItem?.canNum,
                  num: item.num,
                  finalDeliveryNum: finalDeliveryNum
                });
                return {
                  orderItemId: item.id,
                  deliveryNum: item.canNum ? item.canNum : item.num,
                  deliveryNum: finalDeliveryNum,
                };
              }),
            };
            console.log('---------------------->',JSON.stringify(submit));
            const res = await API_Order.partDelivery(this.sn, submit);
            if (res.success) {
              this.$Message.success("发货成功!");
              this.shipLoading = false;
              // 清空选中的商品数据,避免数据残留
              this.selectGroupShipGoods = [];
              // 重置弹窗打开标识,下次打开时显示默认值
              this.groupShipModalOpened = false;
              this.getDataDetail();
              this.getOrderPackage();
              this.groupShipModal = false;
@@ -987,13 +1014,21 @@
          this.allowOperation = res.result.allowOperationVO;
          if (res.result.orderItems.length) {
            this.data = res.result.orderItems.map((item) => {
              // 只在弹窗打开状态下才保留用户修改的canNum值
              const existingItem = this.groupShipModalOpened ? this.data.find(d => d.id === item.id) : null;
              const defaultCanNum = item.num - item.deliverNumber;
              return {
                ...item,
                ___num: item.num,
                _disabled: item.deliverNumber >= item.num,
                canNum: item.num - item.deliverNumber
                // 如果弹窗已打开且用户已经修改过canNum且值合理,则保留;否则使用默认值
                canNum: (existingItem && existingItem.canNum !== undefined && existingItem.canNum <= defaultCanNum)
                  ? existingItem.canNum
                  : defaultCanNum
              };
            });
            console.log('---------------------->订单详情',this.data)
          }
          this.orderLogData = res.result.orderLogs;
          this.typeList = JSON.parse(JSON.stringify(res.result.order.priceDetailDTO.discountPriceDetail));