yangfeng
2023-11-09 2366cd3edcbeddc7b02f79515c902387778efe3b
增加修改销售明细状态接口及联通
3个文件已修改
42 ■■■■ 已修改文件
src/api/sales/salesDetails.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/index.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/sales/salesDetails.js
@@ -24,6 +24,14 @@
    data
  })
}
// 修改销售明细状态
export function updateStatus(data) {
  return request({
    url: "/api/salesDetails/updateStatus",
    method: "post",
    data
  })
}
// 更新销售明细
export function getUpdateSalesDetails(data) {
  return request({
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -695,7 +695,8 @@
        logisticCost: data.logisticCost || 0,
        logisticNumber: data.logisticNumber || "",
        quotationId: this.quotationId,
        deliverType: data.deliverType || 0
        deliverType: data.deliverType || 0,
        status: 1
      }
      let params = {}
      if (this.editConfig.title === "新建") {
src/views/sales/salesDetails/index.vue
@@ -40,12 +40,12 @@
            <template slot="tableButton">
              <el-table-column label="操作" width="180">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row, '查看')" type="text" size="small">查看</el-button>
                  <el-button @click.stop="handleClick(scope.row, '查看')" type="text" size="small">查看</el-button>
                  <template v-if="scope.row.status === 1">
                    <el-button @click="handleClick(scope.row, '编辑')" type="text" size="small">编辑</el-button>
                    <el-button @click="submitClick(scope.row)" type="text" size="small">确认提交</el-button>
                    <el-button @click.stop="handleClick(scope.row, '编辑')" type="text" size="small">编辑</el-button>
                    <el-button @click.stop="submitClick(scope.row)" type="text" size="small">确认提交</el-button>
                    <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
                    <el-button @click="closeClick(scope.row.id)" type="text" size="small">关闭</el-button>
                    <el-button @click.stop="closeClick(scope.row)" type="text" size="small">关闭</el-button>
                  </template>
                </template>
              </el-table-column>
@@ -123,7 +123,8 @@
  getSalesDetailsList,
  getDelSalesDetails,
  getProductInventoryInfo,
  getProductOrderInfo
  getProductOrderInfo,
  updateStatus
} from "@/api/sales/salesDetails"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification"
@@ -365,8 +366,7 @@
                  ...item,
                  client_name: item.client.name,
                  member_name: item.Member.username,
                  source: "CRM同步",
                  status: 2
                  source: "CRM同步"
                }
              })
              this.tableList.tableInfomation = list || []
@@ -439,12 +439,27 @@
      }
    },
    // 确认提交
    submitClick(row) {
    async submitClick(row) {
      console.log(row, "确认提交")
      this.updateStatus(row.id, 2)
    },
    // 关闭
    closeClick(row) {
      console.log(row, "关闭")
      this.updateStatus(row.id, 4)
    },
    // 修改状态
    async updateStatus(id, status) {
      await updateStatus({
        id: id,
        status: status
      }).then((res) => {
        console.log(res)
        if (res.code == 200) {
          this.$message.success("修改成功")
          this.getData()
        }
      })
    },
    // 删除
    delClick(rowID) {