feat: 销售机会/报价单销售总单/销售子单 去除批量删除添加单独删除;表单宽度/label宽度调整
8个文件已修改
216 ■■■■ 已修改文件
src/views/sales/masterOrder/AddMasterOrderDialog.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/masterOrder/index.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/quotation/AddQuotationDialog.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/quotation/index.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesOpportunity/index.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/subOrder/AddSubOrderDialog.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/subOrder/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/masterOrder/AddMasterOrderDialog.vue
@@ -13,7 +13,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="120px"
        size="mini"
      >
        <!-- 信息 -->
@@ -59,7 +59,7 @@
                    v-model="editConfig.infomation.member_id"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    style="width: 100%"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
@@ -71,6 +71,7 @@
                  <el-date-picker
                    v-model="editConfig.infomation.start_time"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    style="width: 100%"
                    type="datetime"
                    placeholder="选择日期"
                  >
@@ -83,6 +84,7 @@
                    v-model="editConfig.infomation.end_time"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    type="datetime"
                    style="width: 100%"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
@@ -96,7 +98,7 @@
                    :min="0"
                    :precision="2"
                    :controls="false"
                    style="width: 25%; margin-right: 5px"
                    style="width: 100%"
                  ></el-input-number>
                </el-form-item>
              </el-col>
@@ -177,7 +179,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -338,6 +340,9 @@
            font-size: 18px;
            cursor: pointer;
          }
          .el-autocomplete{
            flex: 1;
          }
        }
      }
      .address-view {
src/views/sales/masterOrder/index.vue
@@ -8,15 +8,13 @@
      <div class="filter-card">
        <CommonSearch
            :show-add="false"
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            placeholder="请输入单据编号"
            @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
            <el-button size="small"  @click="delClick">删除</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
          </template>
        </CommonSearch>
      </div>
@@ -29,7 +27,6 @@
              ref="tableListRef"
              :show-summary="showSummary"
              :table-list="tableList"
              :select-box="!isDetail"
              @selClientClick="selClientClick"
              @selCommonClick="selCommonClick"
              @getSelectArray="getSelectArray"
@@ -39,7 +36,7 @@
              <el-table-column label="操作" width="90">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
                   <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
@@ -243,7 +240,7 @@
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
    },
    // 删除
    // 批量删除
    delClick() {
      if (this.selValueList && this.selValueList.length > 0) {
        this.$confirm("是否确认删除?", "警告", {
@@ -266,6 +263,33 @@
        this.$message.warning("请至少选择一条记录")
      }
    },
    /**
     * 单个删除
     * @param id 销售总单id
     */
    deleteItem(id) {
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
          .then(() => {
            getDelMasterOrder({ids: [id]}).then((response) => {
              if (response.code === 200) {
                this.$message.success("删除成功")
                this.getData()
              } else {
                this.$message.warning("删除失败")
              }
            })
          })
          .catch((err) => {
            if (err !== 'cancel') {
              console.error(err)
              this.$message.warning("删除失败")
            }
          })
    },
    getSelectArray(val) {
      console.log(val)
      this.selValueList = []
src/views/sales/quotation/AddQuotationDialog.vue
@@ -13,7 +13,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="110px"
        size="mini"
        style="height: 60vh; overflow-x: hidden"
      >
@@ -82,6 +82,7 @@
                    v-model="editConfig.infomation.validity_date"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    type="datetime"
                    style="width: 100%"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
@@ -119,7 +120,7 @@
                    v-model="editConfig.infomation.member_id"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    style="width: 100%"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
@@ -324,7 +325,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        client_id: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -625,7 +626,7 @@
        .common-select {
          display: flex;
          .common-select-sel {
            width: 270px;
            flex: 1;
          }
          .common-select-btn {
            margin-left: 5px;
@@ -633,6 +634,11 @@
            cursor: pointer;
          }
        }
        .custom-name{
          .el-autocomplete{
            flex: 1;
          }
        }
      }
      .annex-view {
        display: flex;
src/views/sales/quotation/index.vue
@@ -8,15 +8,13 @@
      <div class="filter-card">
        <CommonSearch
            :show-add="false"
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            placeholder="请输入报价单号"
            @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
            <el-button size="small"  @click="delClick">删除</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
          </template>
        </CommonSearch>
      </div>
@@ -28,7 +26,6 @@
          <TableCommonView
              ref="tableListRef"
              :table-list="tableList"
              :select-box="!isDetail"
              @selClientClick="selClientClick"
              @selContactsClick="selContactsClick"
              @selCommonClick="selCommonClick"
@@ -39,7 +36,7 @@
              <el-table-column label="操作" width="90">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
                   <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
@@ -242,7 +239,7 @@
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row, currency: "人民币" }
    },
    // 删除
    // 批量删除
    delClick() {
      if (this.selValueList && this.selValueList.length > 0) {
        this.$confirm("是否确认删除?", "警告", {
@@ -265,6 +262,33 @@
        this.$message.warning("请至少选择一条记录")
      }
    },
    /**
     * 单个删除
     * @param id 报价单id
     */
    deleteItem(id) {
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
          .then(() => {
            getDelQuotation({ids: [id]}).then((response) => {
              if (response.code === 200) {
                this.$message.success("删除成功")
                this.getData()
              } else {
                this.$message.warning("删除失败")
              }
            })
          })
          .catch((err) => {
            if (err !== 'cancel') {
              console.error(err)
              this.$message.warning("删除失败")
            }
          })
    },
    getSelectArray(val) {
      console.log(val)
      this.selValueList = []
src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
@@ -13,7 +13,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="208px"
        size="mini"
        style="height: 60vh; overflow-x: hidden"
      >
@@ -151,7 +151,7 @@
                    v-model="editConfig.infomation.member_id"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    style="width: 100%"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
@@ -214,7 +214,7 @@
                    v-model="editConfig.infomation.currency"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    style="width: 100%"
                  >
                    <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
@@ -229,7 +229,7 @@
                    :min="0"
                    :precision="2"
                    :controls="false"
                    style="width: 25%; margin-right: 5px"
                    style="width: 100%"
                  ></el-input-number>
                </el-form-item>
              </el-col>
@@ -239,6 +239,7 @@
                    v-model="editConfig.infomation.expected_time"
                    value-format="yyyy-MM-dd"
                    type="date"
                    style="width: 100%"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
@@ -278,16 +279,17 @@
          <div class="basic-info-title">商机七要素(5W2P)</div>
          <div class="basic-info-view">
            <el-row>
              <el-col :span="20">
              <el-col>
                <el-form-item label="客户需求或痛点(why)" prop="pain_points">
                  <el-input
                    type="textarea"
                    style="width: 100%"
                    :autosize="{ minRows: 2 }"
                    v-model="editConfig.infomation.pain_points"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="是否已经立项(plan)" prop="whether_established">
                  <el-input
                    type="textarea"
@@ -296,7 +298,7 @@
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="资金预算是多少(plan)" prop="capital_budget">
                  <el-input
                    type="textarea"
@@ -305,7 +307,7 @@
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="关键决策人是谁(who)" prop="key_maker">
                  <el-input
                    type="textarea"
@@ -314,7 +316,7 @@
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="关键决策因素有哪些(what)" prop="key_factors">
                  <el-input
                    type="textarea"
@@ -323,7 +325,7 @@
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="决策流程是怎样的(what)" prop="process">
                  <el-input
                    type="textarea"
@@ -332,7 +334,7 @@
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="20">
              <el-col>
                <el-form-item label="竞争对手提供的方案(what)" prop="solutions">
                  <el-input
                    type="textarea"
@@ -466,7 +468,7 @@
                  </div>
                </el-form-item>
              </el-col> -->
              <el-col :span="20">
              <el-col>
                <el-form-item label="详细地址" prop="detail_address">
                  <el-input
                    type="textarea"
@@ -482,7 +484,7 @@
          <div class="basic-info-title">备注信息</div>
          <div class="basic-info-view">
            <el-row>
              <el-col :span="20">
              <el-col>
                <el-form-item label="备注" prop="remark">
                  <el-input
                    type="textarea"
@@ -578,7 +580,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入销售机会编号", trigger: "blur" }],
@@ -829,7 +831,12 @@
        }
        .common-select {
          .common-select-sel {
            width: 270px;
            flex: 1;
          }
        }
        .custom-name{
          .el-autocomplete{
            flex: 1;
          }
        }
      }
src/views/sales/salesOpportunity/index.vue
@@ -10,13 +10,12 @@
            :show-add="false"
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            placeholder="请输入机会名称"
            @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
            <el-button size="small"  @click="delClick">删除</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
          </template>
        </CommonSearch>
      </div>
@@ -28,6 +27,7 @@
          <TableCommonView
              ref="tableListRef"
              :table-list="tableList"
              :select-box="false"
              @selClientClick="selClientClick"
              @selContactsClick="selContactsClick"
              @selCommonClick="selCommonClick"
@@ -35,11 +35,11 @@
              @selTableCol="selTableCol"
          >
            <template slot="tableButton">
              <el-table-column label="操作" width="100">
              <el-table-column label="操作" width="120">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <el-button @click="followupClick(scope.row)" type="text" size="small">跟进</el-button>
                  <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
                   <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
@@ -257,7 +257,7 @@
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
    },
    // 删除
    // 批量删除
    delClick() {
      if (this.selValueList && this.selValueList.length > 0) {
        this.$confirm("是否确认删除?", "警告", {
@@ -281,6 +281,33 @@
        this.$message.warning("请至少选择一条记录")
      }
    },
    /**
     * 单个删除
     * @param id 销售机会id
     */
    deleteItem(id) {
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
          .then(() => {
            getDelSaleChance({ids: [id]}).then((response) => {
              if (response.code === 200) {
                this.$message.success("删除成功")
                this.getData()
              } else {
                this.$message.warning("删除失败")
              }
            })
          })
          .catch((err) => {
            if (err!== 'cancel'){
              console.error(err)
              this.$message.warning("删除失败")
            }
          })
    },
    getSelectArray(val) {
      console.log(val)
      this.selValueList = []
src/views/sales/subOrder/AddSubOrderDialog.vue
@@ -13,7 +13,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="100px"
        size="mini"
      >
        <!-- 信息 -->
@@ -88,7 +88,7 @@
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    style="width: 100%"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
@@ -200,7 +200,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -498,6 +498,9 @@
            font-size: 18px;
            cursor: pointer;
          }
          .el-autocomplete{
            flex: 1;
          }
        }
      }
      .address-view {
src/views/sales/subOrder/index.vue
@@ -8,15 +8,13 @@
      <div class="filter-card">
        <CommonSearch
            :show-add="false"
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            placeholder="请输入单据编号"
            @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
            <el-button size="small"  @click="delClick">删除</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
          </template>
        </CommonSearch>
      </div>
@@ -29,7 +27,6 @@
              ref="tableListRef"
              :table-list="tableList"
              :show-summary="showSummary"
              :select-box="!isDetail"
              @selClientClick="selClientClick"
              @selMasterClick="selMasterClick"
              @selCommonClick="selCommonClick"
@@ -40,7 +37,7 @@
              <el-table-column label="操作" width="90">
                <template slot-scope="scope">
                  <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
                  <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> -->
                   <el-button @click="deleteItem(scope.row.id)" type="text" size="small">删除</el-button>
                </template>
              </el-table-column>
            </template>
@@ -284,6 +281,33 @@
        this.$message.warning("请至少选择一条记录")
      }
    },
    /**
     * 单个删除
     * @param id 销售子单id
     */
    deleteItem(id) {
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
          .then(() => {
            getDelSubOrder({ids: [id]}).then((response) => {
              if (response.code === 200) {
                this.$message.success("删除成功")
                this.getData()
              } else {
                this.$message.warning("删除失败")
              }
            })
          })
          .catch((err) => {
            if (err !== 'cancel') {
              console.error(err)
              this.$message.warning("删除失败")
            }
          })
    },
    getSelectArray(val) {
      console.log(val)
      this.selValueList = []