戴艳蓉 hace 3 años
padre
commit
8705465e07

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/css/chunk-0edf86e8.03c5ca80.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/static/js/chunk-0edf86e8.57a967c1.js


+ 1 - 1
src/apis/service/purchaseIn/workbench/index.js

@@ -11,7 +11,7 @@ export default {
   // 列表4
   list4: (data, params) => http(api + "activitylist", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "customarinfo", data, "post", params),
+  detail: (data, params) => http(api + "consultzxinfo", data, "post", params),
   // 更新
   update: (data, params) => http(api + "customaredit", data, "post", params),
   // 新建

+ 2 - 1
src/apis/service/sellOut/zixunOrder/index.js

@@ -10,7 +10,8 @@ export default {
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
   list: (data, params) => http(api + "consultlists", data, "post", params),
-
+  // 项目详情
+  pdetail: (data, params) => http(api + "projectinfo", data, "post", params),
 
   // 详情
   detail: (data, params) => http(api + "afterinfo", data, "post", params),

+ 334 - 11
src/views/purchaseIn/workbench/columns.js

@@ -1,8 +1,8 @@
 
 //是否定制
 const options1 = [
-  { id: "0", name: "" },
-  { id: "1", name: "" },
+  { id: "0", name: "" },
+  { id: "1", name: "" },
 ]
 //专属类型
 const options2 = [
@@ -11,24 +11,29 @@ const options2 = [
 ]
 //销售权限
 const options3 = [
-  { id: "0", name: "销售权限" },
-  { id: "1", name: "销售权限" },
+  { id: "0", name: "销售权限" },
+  { id: "1", name: "销售权限" },
 ]
 
 //是否库存品
 const options4 = [
-  { id: "0", name: "库存品" },
-  { id: "1", name: "库存品" },
+  { id: "0", name: "库存品" },
+  { id: "1", name: "库存品" },
 ]
 //是否启用实时金价
 const options5 = [
-  { id: "0", name: "" },
-  { id: "1", name: "" },
+  { id: "0", name: "" },
+  { id: "1", name: "" },
 ]
 //供货区域
 const options6 = [
-  { id: "0", name: "全国" },
-  { id: "1", name: "全国除偏远" },
+  { id: "1", name: "全国" },
+  { id: "2", name: "全国除偏远" },
+]
+//是否启用阶梯
+const options7 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
 ]
 const listCol = [
   {
@@ -87,5 +92,323 @@ const listCol = [
     _slot_: "operation",
   },
 ]
+const rules = {
+  cat_id: [
+    {
+      type: "array",
+      required: true,
+      message: "商品分类",
+      trigger: "change",
+    },
+  ],
+  brandid: [
+    {
+      type: "array",
+      required: false,
+      message: "商品品牌",
+      trigger: "change",
+    },
+  ],
+  noble_weight: [
+    {
+      required: true,
+      message: "贵金属重量为合法数字",
+      trigger: "blur",
+    },
+  ],
+  weight: [
+    {
+      required: true,
+      message: "商品总重量为合法数字",
+      trigger: "blur",
+    },
+  ],
+  good_type: [
+    {
+      required: true,
+      message: "请选择是否定制",
+      trigger: "change",
+    },
+  ],
+  is_stock: [
+    {
+      required: true,
+      message: "请选择是否库存品",
+      trigger: "change",
+    },
+  ],
+  company_id: [
+    {
+      required: true,
+      message: "请选择业务公司",
+      trigger: "change",
+    },
+  ],
+  supplierNo: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择供应商",
+      trigger: "change",
+    },
+  ],
+  is_auth: [
+    {
+      required: true,
+      message: "商品主图",
+      trigger: "change",
+    },
+  ],
+  tax: [
+    {
+      required: true,
+      message: "请选择税率",
+      trigger: "change",
+    },
+  ],
+  good_name: [
+    {
+      required: true,
+      message: "请输入商品名称",
+      trigger: "blur",
+    },
+  ],
+  unit: [
+    {
+      type: "array",
+      required: true,
+      message: "请输入商品单位",
+      trigger: "blur",
+    },
+  ],
+  is_exclusive: [
+    {
+      required: true,
+      message: "请选择专属类型",
+      trigger: "change",
+    },
+  ],
+  noble_metal: [
+    {
+      required: true,
+      message: "请选择贵金属种类",
+      trigger: "change",
+    },
+  ],
+  is_gold_price: [
+    {
+      required: true,
+      message: "请选择是否启用实时金价",
+      trigger: "change",
+    },
+  ],
+  moq: [
+    {
+      required: true,
+      message: "定制起订量应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  customized: [
+    {
+      required: true,
+      message: "定制工期为合法数字",
+      trigger: "blur",
+    },
+  ],
+  after_sales: [
+    {
+      required: true,
+      message: "售后说明不能为空",
+      trigger: "blur",
+    },
+  ],
+  good_remark: [
+    {
+      required: true,
+      message: "商品备注不能为空",
+      trigger: "blur",
+    },
+  ],
+  //包装/发货/图片
+  packing_list: [
+    {
+      required: true,
+      message: "请输入包装清单",
+      trigger: "blur",
+    },
+  ],
+  packing_way: [
+    {
+      required: true,
+      message: "请输入包装方式",
+      trigger: "blur",
+    },
+  ],
+
+  packing_spec: [
+    {
+      required: true,
+      message: "请输入装箱规格",
+      trigger: "blur",
+    },
+  ],
+  packing_weight: [
+    {
+      required: true,
+      message: "请输入装箱重量",
+      trigger: "blur",
+    },
+  ],
+  packing_szie: [
+    {
+      required: true,
+      message: "请输入装箱尺寸",
+      trigger: "blur",
+    },
+  ],
+  supply_area: [
+    {
+      required: true,
+      message: "请选择供货区域",
+      trigger: "change",
+    },
+  ],
+  delivery_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择发货地",
+      trigger: "change",
+    },
+  ],
+  origin_place: [
+    {
+      type: "array",
+      required: true,
+      message: "请选择产地",
+      trigger: "change",
+    },
+  ],
+  delivery_day: [
+    {
+      required: true,
+      message: "请输入物流时间",
+      trigger: "blur",
+    },
+  ],
+  lead_time: [
+    {
+      required: true,
+      message: "请输入供货周期",
+      trigger: "blur",
+    },
+  ],
+  sample_day: [
+    {
+      required: true,
+      message: "请输入调样周期",
+      trigger: "blur",
+    },
+  ],
+  packing_size: [
+    {
+      required: true,
+      message: "请输入装箱尺寸",
+      trigger: "blur",
+    },
+  ],
+  good_thumb_img: [
+    {
+      required: true,
+      message: "商品缩略图",
+      trigger: "change",
+    },
+  ],
+  // good_img: [
+  //   {
+  //     required: true,
+  //     message: "商品详情主图",
+  //     trigger: "change",
+  //   },
+  // ],
+  good_info_img: [
+    {
+      type: "array",
+      required: true,
+      message: "商品详情介绍图",
+      trigger: "change",
+    },
+  ],
 
-export  { options1, options2, options3, options4, options5, options6,listCol }
+  //固定成本
+  cert_fee: [
+    {
+      required: true,
+      message: "证书费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  packing_fee: [
+    {
+      required: true,
+      message: "包装费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  cost_fee: [
+    {
+      required: true,
+      message: "成本工艺费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  mark_fee: [
+    {
+      required: true,
+      message: "加标费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  demo_fee: [
+    {
+      required: true,
+      message: "打样应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  open_fee: [
+    {
+      required: true,
+      message: "开模费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  sample_fee: [
+    {
+      required: true,
+      message: "调样费应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  market_price: [
+    {
+      required: true,
+      message: "市场价应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  nake_price: [
+    {
+      required: true,
+      message: "含税成本合计应为合法数字",
+      trigger: "blur",
+    },
+  ],
+  is_step: {
+    required: true,
+    message: "请选择是否启用阶梯",
+    trigger: "change",
+  },
+}
+export { options1, options2, options3, options4, options5, options6, options7, listCol, rules }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 636 - 444
src/views/purchaseIn/workbench/components/baseForm.vue


+ 178 - 706
src/views/purchaseIn/workbench/detail.vue

@@ -1,320 +1,101 @@
 <template>
-  <div class="workbenchDateil pagePadding">
+  <div class="workbenchdetail">
     <div
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+      class="page-main"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
-      <el-row style="margin-bottom: 10px">
-        <el-col :span="6" style="width: 316px">
-          <period-date-picker
-            :start="parmValue.start"
-            :end="parmValue.end"
-            :type="1"
-            :width="'147px'"
-            :size="searchSize"
-            @timeReturned="timeReturned($event)"
-          ></period-date-picker>
-        </el-col>
-        <el-col :span="18" id="el-cor-full-style">
-          <el-row :gutter="10">
-            <el-col :span="6">
-              <el-cascader
-                v-model="parmValue.catid"
-                style="width: 100%"
-                filterable
-                :size="searchSize"
-                clearable
-                placeholder="商品分类"
-                :options="catOptions"
-                :props="{ expandTrigger: 'hover', checkStrictly: true }"
-                @change="handleChange"
-              ></el-cascader>
-            </el-col>
-            <el-col :span="6">
-              <el-select
-                v-model="parmValue.status"
-                filterable
-                clearable
-                :size="searchSize"
-                placeholder="请选择状态"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in statusList"
-                  :key="'status' + item.code"
-                  :label="item.name"
-                  :value="item.code"
-                />
-              </el-select>
-            </el-col>
-
-            <el-col :span="6">
-              <el-input
-                :size="searchSize"
-                style="100%"
-                v-model="parmValue.supplier_name"
-                :maxlength="40"
-                placeholder="供货商名称"
-              ></el-input>
-            </el-col>
-            <el-col :span="6">
-              <el-input
-                :size="searchSize"
-                style="100%"
-                v-model="parmValue.good_code"
-                :maxlength="40"
-                placeholder="商品编码"
-              ></el-input>
-            </el-col>
-          </el-row>
-        </el-col>
-      </el-row>
-      <el-row style="margin-bottom: 18px">
-        <el-col :span="6" style="width: 316px">
-          <el-input
-            :size="searchSize"
-            :maxlength="10"
-            placeholder="最低售价"
-            v-model="parmValue.sale_price_start"
-            style="width: 150px"
-          ></el-input>
-          <samp>至</samp>
-          <el-input
-            :size="searchSize"
-            :maxlength="10"
-            placeholder="最高售价"
-            v-model="parmValue.sale_price_end"
-            style="width: 150px"
-          ></el-input>
-        </el-col>
-
-        <el-col :span="18" id="el-cor-full-style">
-          <el-row :gutter="10">
-            <el-col :span="12">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.goods_name"
-                :maxlength="40"
-                placeholder="商品名称"
-              >
-                <el-button
-                  slot="append"
-                  icon="el-icon-search"
-                  @click="searchList"
-                ></el-button>
-              </el-input>
-            </el-col>
-            <el-col :span="12">
-              <el-button
-               v-if="powers.some((item) => item == '024')"
-                type="warning"
-                class="fl"
-                :size="searchSize"
-                @click="restSearch"
-              >
-                重置
-              </el-button>
-              <el-button
-               v-if="powers.some((item) => item == '002')"
-                type="primary"
-                :size="searchSize"
-                class="fr"
-                style="margin-left: 5px"
-                @click="searchList"
-              >
-                刷新
-              </el-button>
-              <el-button
-               v-if="powers.some((item) => item == '003')"
-                type="success"
-                :size="searchSize"
-                style="float: right"
-                @click="openModal('add', false)"
-              >
-                添加
-              </el-button>
-            </el-col>
-          </el-row></el-col
-        >
-      </el-row>
-      <el-table
-        :data="tableData"
-        stripe
-        v-loading="loading"
-        border
-        :size="size"
-        style="width: 100%"
-      >
-        <el-table-column label="商品信息" align="left" min-width="165">
-          <template slot-scope="item">
-            <div class="good_name_title">
-              {{ item.row.good_name }}
-            </div>
-            <div
-              class="good_name_img"
-              v-if="item.row.galleyList && item.row.galleyList.length > 0"
-            >
-              <img
-                v-for="(img, i) in item.row.galleyList"
-                :key="item.row.id + 'goodimg' + i"
-                :src="img"
-                @click="showGalley(item.row.galleyList, i)"
-                alt=""
-              />
-            </div> </template
-        ></el-table-column>
-        <el-table-column label="供应商信息" show-overflow-tooltip align="left">
-          <template slot-scope="item">
-            <div v-if="item.row.supplier_info">
-              <div class="good_name_title">
-                企业:{{ item.row.supplier_info.company }}
-              </div>
-              <div class="good_name_title">
-                联系人:{{ item.row.supplier_info.name }}
-              </div>
-            </div>
-          </template></el-table-column
+      <div class="left">
+        <div class="left-card">
+          <div class="page-main-title">咨询单信息</div>
+          <ul class="page-main-ul clear">
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+          </ul>
+        </div>
+        <div class="left-card">
+          <div class="page-main-title">商品要求</div>
+          <ul class="page-main-ul clear">
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+            <li>咨询单号:</li>
+            <li>cddv21324</li>
+            <li>截止时间:</li>
+            <li>2020-09-20 17:00:00</li>
+          </ul>
+        </div>
+      </div>
+      <div class="right"><base-form :id="1" :sitem="{}" /></div>
+      <div class="bottom">
+        <el-table
+          :data="tableData"
+          border
+          stripe
+          :size="'mini'"
+          style="width: 100%"
         >
-        <el-table-column
-          prop="good_code"
-          label="商品编码"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column
-          prop="catName"
-          label="商品分类"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-
-        <el-table-column label="状态" show-overflow-tooltip align="center">
-          <template slot-scope="scope">
-            <el-tag
-              v-if="scope.row.status === '1'"
-              type="success"
-              :class="{ 'hover-tag': powers.some((item) => item == '004') }"
-              :size="tablebtnSize"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  powers.some((item) => item == '026')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '026')"
-                style="margin-right: 1px"
-              ></i>
-              销售中</el-tag
-            >
-            <el-tag
-              v-else
-              :class="{ 'hover-tag': powers.some((item) => item == '026') }"
-              :size="tablebtnSize"
-              type="warning"
-              @click="
-                statusConfirm(
-                  scope.row.id,
-                  scope.row.status,
-                  powers.some((item) => item == '026')
-                )
-              "
-            >
-              <i
-                class="el-icon-thumb"
-                v-if="powers.some((item) => item == '026')"
-                style="margin-right: 1px"
-              ></i>
-              已下架</el-tag
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="addtime"
-          label="创建时间"
-          show-overflow-tooltip
-          align="center"
-        ></el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-link
-              v-if="powers.some((item) => item == '011')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="
-                showPrice(
-                  scope.row.LimitPrice,
-                  scope.row.left,
-                  scope.row.right,
-                  scope.row.lang
-                )
-              "
-            >
-              价格
-            </el-link>
-            <el-link
-              v-if="powers.some((item) => item == '012')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="copy(scope.row.id)"
-            >
-              复制
-            </el-link>
-            <el-link
-              v-if="
-                scope.row.status === '0' && powers.some((item) => item == '005')
-              "
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="openModal(scope.row.id, false)"
-            >
-              修改
-            </el-link>
-            <el-link
-              v-if="powers.some((item) => item == '006')"
-              type="primary"
-              style="margin: 0 4px"
-              :underline="false"
-              :size="tablebtnSize"
-              @click="deleteById(scope.row.id, scope.row.status)"
-            >
-              删除
-            </el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div
-        class="Pagination"
-        style="text-align: right; margin-top: 10px"
-        v-show="count > 0"
-      >
-        <el-pagination
-          :size="searchSize"
-          @size-change="handleSizeChange"
-          @current-change="handlePageChange"
-          :current-page="parmValue.page"
-          :page-sizes="[10, 15, 20, 30, 40]"
-          :page-size="parmValue.size"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="count"
-        ></el-pagination>
+          <el-table-column prop="date" label="日期" width="180">
+          </el-table-column>
+          <el-table-column prop="name" label="姓名" width="180">
+          </el-table-column>
+          <el-table-column prop="address" label="地址"> </el-table-column>
+        </el-table>
       </div>
-      <ladder-price
-        :showModel="showLadderPrice"
-        :left="left"
-        :right="right"
-        :lang="lang"
-        @cancel="showLadderPrice = false"
-      ></ladder-price>
-    
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -322,62 +103,23 @@
   </div>
 </template>
    <script>
-import mixinPage from "@/mixins/elPaginationHandle";
 import asyncRequest from "@/apis/service/purchaseIn/workbench";
-import ladderPrice from "./ladderPrice";
-// import PeriodDatePicker from "@/components/PeriodDatePicker";
-import statusList from "@/assets/js/statusList";
-import { timestampToTime } from "@/utils/validate";
+import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
+import baseForm from "./components/baseForm";
 export default {
-  name: "workbenchDateil",
+  name: "workbenchDetail",
   components: {
-    // PeriodDatePicker,
-    ladderPrice,
-  },
-  data() {
-    return {
-      imgList: [],
-      index: 0,
-      showImgModel: false,
-      statusList: statusList,
-      catOptions: [],
-      showLadderPrice: false,
-      loading: false,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-      left: {},
-      right: {},
-      lang: "0px",
-      parmValue: {
-        catid: "", //种类id
-        start: "", //起始时间,
-        end: "", //结束时间
-        sale_price_start: "", //最低售价
-        sale_price_end: "", //最高售价
-        status: "",
-        goods_name: "", //商品名称
-        good_code: "", //商品code
-        supplier_name: "", //供货商
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      },
-      count: 0, // 总条数
-      tableData: [],
-      headLadder: {
-        num: "起订量≥",
-        price: "成本价",
-      },
-    };
+    baseForm,
   },
-  mixins: [mixinPage],
+
+  mixins: [resToken],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "workbenchDateil"
+          (item) => item.menu_route == "workbenchDetail"
         ) || {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
@@ -386,374 +128,104 @@ export default {
       }
     },
   },
-  mounted() {
-    // this.searchList();
-    // this.getAllCat();
+  data() {
+    return {
+      loading: false,
+      showModel: false,
+      tableData: [],
+      isDetail: false,
+      modelId: 0,
+    };
   },
+  mounted() {},
 
-  methods: {
-    restSearch() {
-      this.parmValue = {
-        catid: "", //种类id
-        start: "", //起始时间,
-        end: "", //结束时间
-        sale_price_start: "", //最低售价
-        sale_price_end: "", //最高售价
-        status: "",
-        goods_name: "", //商品名称
-        good_code: "", //商品code
-        supplier_name: "", //供货商
-        page: 1, // 页码
-        size: 10, // 每页显示条数
-      };
-      this.searchList();
-    },
-    async handleChange() {
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
-    async timeReturned(e) {
-      if (e.startTime !== "") {
-        this.parmValue.start = timestampToTime(e.startTime);
-      } else {
-        this.parmValue.start = "";
-      }
-
-      if (e.endTime !== "") {
-        this.parmValue.end = timestampToTime(e.endTime);
-      } else {
-        this.parmValue.end = "";
-      }
-      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
-        this.parmValue.page = 1;
-        await this.searchList();
-      }
-    },
-    openModal(id, isDetail) {
-      if (id !== "add") {
-        this.$message.warning("正在开发中!");
-      } else {
-        this.showModel = true;
-        this.modelId = id;
-        this.isDetail = isDetail;
-      }
-    },
-    showGalley(list, i) {
-      this.imgList = list;
-      this.index = i;
-      this.showImgModel = true;
-    },
-    async copy(id) {
-      let res = await asyncRequest.copy({ id: id });
-      if (res.code === 0) {
-        this.$notify.success({
-          title: "商品复制成功!",
-          message: "",
-        });
-        this.searchList();
-      }
-    },
-    async deleteById(id, status) {
-      if (status === "0") {
-        await this.$confirm("确定要删除该商品?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            let res = await asyncRequest.delete({ goodids: id });
-            if (res.code === 0) {
-              this.$notify.success({
-                title: "删除成功",
-                message: "",
-              });
-              this.searchList();
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      } else {
-        this.$message.warning("只有已下架的商品才能被删除!");
-      }
-    },
-    showPrice(attr, left, right, lang) {
-      if (attr && attr.length > 0) {
-        this.left = left;
-        this.right = right;
-        this.lang = lang;
-        this.showLadderPrice = true;
-      } else {
-        this.$message.warning("该商品暂无阶梯价格信息!");
-      }
-    },
-    async searchList() {
-      let obj = JSON.parse(JSON.stringify(this.parmValue));
-
-      if (obj.catid === "") {
-        obj.catid = "0";
-      }
-      this.loading = true;
-      let res = await asyncRequest.list(obj);
-      if (res.code === 0 && res.data) {
-        let list = res.data.list;
-
-        list = list.map((v1) => {
-          v1.catName = "";
-          v1.galleyList = v1.galley.split(",");
-          v1.addtime = v1.addtime.replaceAll(".000", "");
-          if (v1 && v1.cat && v1.cat.length > 0) {
-            v1.cat.forEach((v2, index) => {
-              v1.catName += index !== 0 ? "/" + v2.cat_name : v2.cat_name;
-            });
-          } else {
-            v1.catName = "";
-          }
-          if (v1 && v1.LimitPrice && v1.LimitPrice.length > 0) {
-            v1.left = {
-              header: [],
-              spec: [],
-            };
-            v1.right = {
-              header: [],
-              spec: [],
-            };
-            v1.left.header = v1.LimitPrice[0].spec;
-            v1.lang = v1.left.header.length * 100 + "px";
-            let ladderNum = 0;
-            v1.LimitPrice.forEach((a) => {
-              if (a.limit && a.limit.length > ladderNum) {
-                ladderNum = a.limit.length;
-              }
-              if (a.spec && a.spec.length > 0) {
-                v1.left.spec.push(a.spec);
-              }
-            });
-            for (let i = 0; i < ladderNum; i++) {
-              v1.right.header.push(this.headLadder);
-            }
-
-            v1.right.spec = v1.LimitPrice;
-            v1.right.spec.map((v1) => {
-              if (v1.limit && v1.limit.length > 0) {
-                for (let j = 0; j < ladderNum; j++) {
-                  if (!v1.limit[j]) {
-                    v1.limit.push({
-                      begin_num: "",
-                      shop_price: "",
-                    });
-                  }
-                }
-              }
-            });
-          }
-          return v1;
-        });
-        this.tableData = list;
-        this.count = Number(res.data.count);
-      } else {
-        this.tableData = [];
-        this.count = 0;
-      }
-      this.loading = false;
-    },
-    async getAllCat() {
-      const res = await asyncRequest.catAll({});
-      if (res.code === 0 && res.data) {
-        let list = res.data;
-        list.map((v1) => {
-          v1.value = v1.id;
-          v1.label = v1.cat_name;
-          if (v1.child && v1.child.length > 0) {
-            v1.child.map((v2) => {
-              v2.value = v2.id;
-              v2.label = v2.cat_name;
-              if (v2.child && v2.child.length > 0) {
-                v2.child.map((v3) => {
-                  v3.value = v3.id;
-                  v3.label = v3.cat_name;
-                  return v3;
-                });
-                v2.children = v2.child;
-              }
-              return v2;
-            });
-            v1.children = v1.child;
-          }
-          return v1;
-        });
-        this.catOptions = list;
-      }
-    },
-    async statusConfirm(id, status, type) {
-      if (!type) {
-        return;
-      }
-      await this.$confirm(
-        `确定要改为${status === "1" ? "已下架" : "销售中"}?`,
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(async () => {
-          this.loading = true;
-          const model = {
-            goodids: id,
-            status: status === "1" ? "0" : "1",
-          };
-          const res = await asyncRequest.status(model);
-          if (res.code === 0) {
-            this.loading = false;
-            this.$notify.success({
-              title: "状态修改成功!",
-              message: "",
-            });
-            await this.searchList();
-          } else {
-            this.loading = false;
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-  },
+  methods: {},
 };
 </script>
    <style lang="scss" scoped>
-.workbenchDateil {
-  $gBC: #dfe6ec;
-  .list-table {
+@import "~@/styles/mixin.scss";
+.workbenchdetail {
+  background: rgba(242, 242, 242, 1);
+  position: relative;
+  width: 100%;
+  height: 100%;
+  box-sizing: border-box;
+  padding: 16px;
+  .page-main {
     position: relative;
     width: 100%;
-    border-top: 1px solid $gBC;
-    border-left: 1px solid $gBC;
+    height: 100%;
+    min-height: 100%;
+    box-sizing: border-box;
     .left {
       position: absolute;
       top: 0;
       left: 0;
-      z-index: 2;
-      background: #fff;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-item {
-          width: 100px;
-          flex: 1;
-          padding: 0 10px;
-          height: 50px;
-          line-height: 50px;
-          border-right: 1px solid $gBC;
-          border-bottom: 1px solid $gBC;
-        }
-      }
-      .header-body {
-        width: 100%;
-        position: relative;
-        .header-body-row {
-          width: 100%;
-          display: flex;
-          .heder-body-col {
-            flex: 1;
-            padding: 0 10px;
-            height: 30px;
-            border-right: 1px solid $gBC;
-            border-bottom: 1px solid $gBC;
-            line-height: 30px;
-          }
-        }
-      }
+      width: 250px;
+      height: 100%;
+      min-height: 100%;
+      overflow-y: scroll;
+      @include scrollBar();
     }
     .right {
-      position: relative;
-      width: 100%;
-      display: block;
-      overflow-x: scroll;
-      .header {
-        width: 100%;
-        display: flex;
-        .header-col {
-          min-width: 240px;
-          flex: 1;
-          height: 50px;
-          line-height: 50px;
+      position: absolute;
+      top: 0;
+      right: 0;
+      width: calc(100% - 266px);
+      height: calc(100% - 150px);
+      min-height: calc(100% - 150px);
+      overflow-y: scroll;
+      background: #fff;
+      @include scrollBar();
+    }
+    .bottom {
+      position: absolute;
+      bottom: 0;
+      right: 0;
+      background: #fff;
+      width: calc(100% - 266px);
+      height: 134px;
+      min-height: 134px;
+      overflow-y: scroll;
+      @include scrollBar();
+    }
+    .left-card,
+    .right-card,
+    .bottom-card {
+      background: #fff;
+      font-size: 12px;
+      // padding:16px;
+      line-height: 18px;
+      margin: 8px 0 0 0;
+      &:first-child {
+        margin: 0;
+      }
+      .page-main-title {
+        height: 45px;
+        font-size: 17px;
+        line-height: 45px;
+        box-sizing: border-box;
+        padding: 0 16px;
+        border-bottom: 1px solid rgba(242, 242, 242, 1);
+      }
+      .page-main-ul {
+        padding: 10px 16px 16px 16px;
+        li {
+          float: left;
+          font-size: 12px;
+          line-height: 25px;
 
-          // position: relative;
-          .header-col-jieti {
-            height: 50px;
-            line-height: 50px;
-            // position: relative;
-            width: 100%;
-            .header-col-jieti-title {
-              // position: relative;
-              width: 100%;
-              line-height: 25px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-              height: 25px;
-            }
-            .header-col-jieti-main {
-              // position: relative;
-              width: 100%;
-              .header-col-item {
-                // position: relative;
-                height: 25px;
-                line-height: 25px;
-                width: 50%;
-                border-right: 1px solid $gBC;
-                border-bottom: 1px solid $gBC;
-              }
-            }
+          &:nth-child(2n + 1) {
+            width: 70px;
+            text-align: right;
           }
-        }
-      }
-      .right-body {
-        position: relative;
-        .right-body-col {
-          position: relative;
-          width: 100%;
-          display: flex;
-          .right-body-col-item {
-            min-width: 240px;
-            flex: 1;
-
-            position: relative;
-            overflow: hidden;
-            .right-body-col-item-div {
-              position: relative;
-              height: 30px;
-              line-height: 30px;
-              width: 50%;
-              padding: 0 10px;
-              border-right: 1px solid $gBC;
-              border-bottom: 1px solid $gBC;
-            }
+          &:nth-child(2n + 2) {
+            width: calc(100% - 70px);
           }
         }
       }
     }
   }
-  .good_name_img {
-    position: relative;
-    width: 156px;
-    img {
-      position: relative;
-      width: 30px;
-      height: 30px;
-      display: inline-block;
-      border-top: 1px solid #dfe6ec;
-      border-right: 1px solid #dfe6ec;
-      border-bottom: 1px solid #dfe6ec;
-      &:hover {
-        cursor: pointer;
-      }
-      &:first-child {
-        border-left: 1px solid #dfe6ec;
-      }
-    }
-  }
 }
 </style>
    

+ 16 - 2
src/views/purchaseIn/workbench/index.vue

@@ -9,7 +9,14 @@
         <li>
           <div class="taskTitle color1">咨询单任务</div>
           <div class="taskList clear">
-            <div class="aaa" v-for="item in list" :key="item">{{ item }}</div>
+            <div
+              class="aaa"
+              v-for="item in list"
+              :key="item"
+              @click="routeGoto('workbenchDetail', { id: 'add' })"
+            >
+              {{ item }}
+            </div>
             <div class="no-data">暂无数据!</div>
           </div>
         </li>
@@ -17,7 +24,14 @@
         <li>
           <div class="taskTitle color2">客户指定商品任务</div>
           <div class="taskList">
-            <div class="aaa" v-for="item in list" :key="item">{{ item }}</div>
+            <div
+              class="aaa"
+              v-for="item in list"
+              :key="item"
+              @click="routeGoto('workbenchDetail', { id: 'add' })"
+            >
+              {{ item }}
+            </div>
             <div class="no-data">暂无数据!</div>
           </div>
         </li>

+ 1 - 1
src/views/sellOut/zixunOrder/columns.js

@@ -84,7 +84,7 @@ const rules = {
   unit: [
     {
       type: "array",
-      required: false,
+      required: true,
       message: "请选择单位",
       trigger: "change",
     },

+ 187 - 89
src/views/sellOut/zixunOrder/components/addEditForm.vue

@@ -67,6 +67,7 @@
             v-model="ruleForm.is_project"
             style="width: 100%"
             placeholder="咨询类型"
+            @change="is_project_change"
           >
             <el-option
               v-for="item in options"
@@ -107,36 +108,89 @@
         </el-form-item>
       </el-col>
       <el-col :span="8" v-if="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目总预算"
-          prop="anomalous_remark"
-          class="clear"
-          required
-        >
+        <el-form-item label="项目总预算" class="clear" required>
           <el-input
             placeholder="项目总预算"
-            v-model="ruleForm.anomalous_remark"
+            v-model="ruleForm.budget_total"
             disabled
           />
         </el-form-item>
       </el-col>
-      <el-col :span="24" v-if="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目用途"
-          prop="anomalous_remark"
-          class="clear"
-          required
-        >
+
+      <el-col :span="16" v-if="ruleForm.is_project === '1'">
+        <el-form-item label="项目用途" class="clear" required>
           <el-input
             placeholder="项目用途"
-            v-model="ruleForm.anomalous_remark"
+            v-model="ruleForm.use_desc"
             disabled
             maxlength="500"
           />
         </el-form-item>
       </el-col>
+      <el-col :span="8" v-if="ruleForm.is_project === '1'">
+        <el-form-item label="要求到货时间" class="clear" required>
+          <el-input
+            placeholder="要求到货时间"
+            v-model="ruleForm.arrtime"
+            disabled
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24" v-if="ruleForm.is_project === '1'">
+        <el-form-item label="项目商品要求" class="clear" required>
+          <el-table
+            ref="multipleTable"
+            :data="ptableData"
+            :size="'mini'"
+            border
+            stripe
+            tooltip-effect="dark"
+            style="width: 100%"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column type="selection" width="40"> </el-table-column>
+            <el-table-column label="商品阶梯" width="70px">
+              <template slot-scope="scope"> {{ scope.$index + 1 }}</template>
+            </el-table-column>
+            <el-table-column prop="good_type" label="商品类型" width="80px">
+              <template slot-scope="scope">
+                <el-tag
+                  :size="'mini'"
+                  v-text="
+                    (
+                      statusOptions.find(
+                        (item) => item.value == scope.row.good_type
+                      ) || {}
+                    ).label || '--'
+                  "
+                ></el-tag
+              ></template>
+            </el-table-column>
+            <el-table-column prop="good_name" label="商品名称" />
+            <el-table-column prop="good_img" label="商品图片" width="70">
+              <template slot-scope="scope">
+                <div
+                  v-if="scope.row.good_img"
+                  style="width: 20px; height: 20px"
+                  class="hover"
+                  v-viewer
+                >
+                  <img
+                    :src="scope.row.good_img"
+                    style="display: inline-block; width: 100%; height: 100%"
+                    alt=""
+                  />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="cat_name" label="商品分类" />
+            <el-table-column prop="budget_price" label="预算单价" width="110" />
+            <el-table-column prop="num" label="购买数量" width="110" />
+          </el-table>
+        </el-form-item>
+      </el-col>
       <el-co :span="24">
-        <el-form-item label="商品信息" class="clear" required>
+        <el-form-item label="咨询商品要求" class="clear" required>
           <el-table
             :data="tableData"
             stripe
@@ -175,67 +229,6 @@
                     />
                   </template> -->
                 </show-data-table>
-
-                <!-- <el-form label-position="left" inline >
-                  <el-row>
-                    <el-col :span="4">
-                      <el-form-item label="型号">
-                        <span>{{ props.row.model }}</span>
-                      </el-form-item></el-col
-                    >
-                    <el-col :span="4">
-                      <el-form-item label="颜色">
-                        <span>{{ props.row.color }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="4">
-                      <el-form-item label="材质">
-                        <span>{{ props.row.material }}</span>
-                      </el-form-item>
-                    </el-col>
-
-                    <el-col :span="4">
-                      <el-form-item label="贵金属种类">
-                        <span>{{ props.row.metal_id }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="4">
-                      <el-form-item label="克重规格">
-                        <span>{{ props.row.metal_id }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="4">
-                      <el-form-item label="当前贵金属单价">
-                        <span>{{ props.row.metal_id }}元/g</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="4">
-                      <el-form-item label="配置要求">
-                        <span>{{ props.row.config }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-form-item label="其他配置要求">
-                        <span>{{ props.row.config }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-form-item label="工艺说明">
-                        <span>{{ props.row.config }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-form-item label="产品用途">
-                        <span>{{ props.row.config }}</span>
-                      </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-form-item label="咨询备注">
-                        <span>{{ props.row.config }}</span>
-                      </el-form-item>
-                    </el-col>
-                  </el-row>
-                </el-form> -->
               </template>
             </el-table-column>
             <el-table-column
@@ -385,14 +378,20 @@ export default {
   },
   data() {
     return {
+      multipleSelection: [],
       // 表格 - 数据
       tableData: [],
+      ptableData: [],
       showModel: false,
       editItem: {},
       options: [
         { value: "0", label: "非项目" },
         { value: "1", label: "项目" },
       ],
+      statusOptions: [
+        { value: "1", label: "竞品" },
+        { value: "2", label: "竞聘" },
+      ],
       ShowDataTableColumns: ShowDataTableColumns,
       configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
       poptions: [],
@@ -412,6 +411,9 @@ export default {
         companyNo: "",
         endtime: "", //咨询截止时间
         platform_code: [], //平台id
+        use_desc: "",
+        budget_total: "",
+        arrtime: "",
       },
       rulesThis: this.rules,
       // 验证规则
@@ -503,9 +505,53 @@ export default {
       this.loading = false;
     },
     openEdit(index, editItem) {
-      this.editItem = editItem;
-      this.editItem.index = index;
-      this.showModel = true;
+      const { is_project } = this.ruleForm;
+      if (index + "" == "-1" && is_project === "1") {
+        if (this.multipleSelection.length === 0) {
+          this.$message.warning("请选择一个项目商品要求!");
+          return;
+        }
+        if (this.multipleSelection.length > 1) {
+          this.$message.warning("每次创建只能选择一个项目商品要求!");
+          return;
+        }
+        const {
+          cat_info,
+          budget_price,
+          pgNo,
+          num,
+          good_type,
+          good_name,
+          good_img,
+        } = this.multipleSelection[0];
+        let cat_id = [];
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e) => {
+            cat_id.push(e.id);
+          });
+        }
+        console.log(this.multipleSelection[0]);
+        this.editItem = {
+          p_cat_info: cat_info,
+          p_cat_id: cat_id,
+          p_budget_price: budget_price,
+          p_pgNo: pgNo,
+          p_num: num,
+          p_good_type: good_type,
+          p_good_name: good_name,
+          p_good_img: good_img,
+          p_arrtime: this.ruleForm.arrtime,
+        };
+        this.editItem.index = index;
+        this.showModel = true;
+      } else {
+        this.editItem = editItem;
+        this.editItem.index = index;
+        this.showModel = true;
+      }
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
     },
     editGoodRefresh(e) {
       const { index } = e;
@@ -518,12 +564,20 @@ export default {
       }
       this.showModel = false;
     },
+    //咨询类型选择
+    is_project_change() {
+      const { is_project } = this.ruleForm;
+      if (is_project === "0") {
+      } else {
+        this.ptableData = [];
+      }
+    },
     async resetForm() {
       this.resign_name = "";
       this.hand_name = "";
       this.status = "";
       // 重置
-      await this.$nextTick(() => {
+      await this.$nextTick(async () => {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
@@ -539,22 +593,29 @@ export default {
           } = this.sitem;
 
           this.ruleForm = {
-            is_project: is_project || "0", //咨询类型 1销售2咨询,
-            projectNo: projectNo ? [projectNo] : [], //项目编号
-            khNo: khNo ? [khNo] : [], //客户编号
-            customer_name: customer_name || "", //客户名称
-            companyNo: companyNo || "",
-            endtime: endtime || "", //咨询截止时间
-            platform_code: platform_code ? [platform_code] : [], //平台id
+            is_project: is_project || "1", //咨询类型 1销售2咨询,
+            projectNo: projectNo ? [projectNo] : ["PROeh2e220301162721"], //项目编号
+            khNo: khNo ? [khNo] : ["KH202104272344"], //客户编号
+            customer_name: customer_name || "泰康人寿湖北分公司F1部", //客户名称
+            companyNo: companyNo || "GSjdi0220222190516",
+            endtime: endtime || "2022-03-10 00:00:00", //咨询截止时间
+            platform_code: platform_code ? [platform_code] : ["8"], //平台id
+            use_desc: "",
+            budget_total: "",
+            arrtime: "",
           };
           this.tableData =
             ladder && ladder.length > 0
               ? JSON.parse(JSON.stringify(ladder))
               : [];
+          if (this.ruleForm.projectNo && this.ruleForm.projectNo.length === 1) {
+            await this.selectChange(this.ruleForm.projectNo);
+          }
         }
       });
     },
     async submitForm() {
+      console.log(this.ruleForm);
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
@@ -594,7 +655,44 @@ export default {
         }
       });
     },
-    selectChange(e) {},
+    //项目选择
+    async selectChange(e) {
+      const key = e && e.length > 0 ? e[0] : "";
+      if (key) {
+        const { code, data, message } = await asyncRequest.pdetail({
+          projectNo: key,
+        });
+        if (code === 0) {
+          const { use_desc, budget_total, ladder, arrtime } = data;
+          this.ruleForm.use_desc = use_desc || "";
+          this.ruleForm.budget_total = budget_total || "";
+          this.ruleForm.arrtime = arrtime || "";
+          this.ptableData = ladder;
+          this.ptableData.forEach((e) => {
+            e.cat_name = "";
+            const { cat_info } = e;
+            if (cat_info && cat_info.length > 0) {
+              cat_info.forEach((b, bi) => {
+                e.cat_name += bi !== 0 ? "/" + b.name : b.name;
+              });
+            }
+          });
+        } else if (code >= 100 && code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(message);
+          this.ptableData = [];
+          this.ruleForm.use_desc = "";
+          this.ruleForm.budget_total = "";
+          this.ruleForm.arrtime = "";
+        }
+      } else {
+        this.ptableData = [];
+        this.ruleForm.use_desc = "";
+        this.ruleForm.budget_total = "";
+        this.ruleForm.arrtime = "";
+      }
+    },
     async remoteMethod(query) {
       this.selectLoading = true;
       this.poptions = [];

+ 44 - 14
src/views/sellOut/zixunOrder/components/addEditGoodModal.vue

@@ -32,7 +32,7 @@
                     v-model="ruleForm.arrival_time"
                     type="date"
                     style="width: 100%"
-                    :disabled="type === 'view'"
+                    :disabled="ruleForm.p_arrtime"
                     value-format="yyyy-MM-dd"
                     :picker-options="pickerOptions"
                     placeholder="到货日期"
@@ -50,6 +50,7 @@
                     :position="'right'"
                     :precision="2"
                     :size="'mini'"
+                    :disabled="ruleForm.p_budget_price"
                     :controls="false"
                     :append="'元'"
                     @reschange="budget_price_change"
@@ -66,6 +67,7 @@
                     :position="'right'"
                     :precision="0"
                     :size="'mini'"
+                    :disabled="ruleForm.p_num"
                     :controls="false"
                     :append="''"
                     @reschange="num_change"
@@ -77,7 +79,6 @@
                 <el-form-item label="品牌" prop="brand_id">
                   <search-brand
                     :value="ruleForm.brand_id"
-                    :disabled="type === 'view' || type === 'editCoin'"
                     :size="'mini'"
                     :isDetail="type !== 'add'"
                     :names="brand_name"
@@ -92,9 +93,7 @@
                     :value="ruleForm.cat_id"
                     @handleChange="goods_class_change"
                     :disabled="
-                      type === 'view' ||
-                      type === 'editBase' ||
-                      type === 'editCoin'
+                      ruleForm.p_cat_id && ruleForm.p_cat_id.length > 0
                     "
                     :size="'mini'"
                     :isDetail="type !== 'add'"
@@ -119,7 +118,7 @@
                     <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                     <file-upload
                       class="Upload"
-                      :disabled="id == '007'"
+                      :disabled="ruleForm.p_good_img"
                       :accept="'.jpg,.png,.jpeg'"
                       :multiple="true"
                       :uploadcondition="beforeAvatarUpload"
@@ -137,7 +136,7 @@
                 <el-form-item label="商品名称" prop="good_name">
                   <el-input
                     v-model="ruleForm.good_name"
-                    :disabled="id == '007'"
+                    :disabled="ruleForm.p_good_name"
                     placeholder="商品名称"
                     minlength="100"
                   />
@@ -419,6 +418,14 @@ export default {
       activeOptions: [],
       actionList: [],
       ruleForm: {
+        p_cat_info: [],
+        p_cat_id: "",
+        p_budget_price: "",
+        p_pgNo: "",
+        p_num: "",
+        p_good_type: "",
+        p_good_name: "",
+        p_good_img: "",
         pgNo: "",
         arrival_time: "",
         budget_price: "0.00",
@@ -483,6 +490,8 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
+          const { index } = this.sitem;
+          let fi = index ? index + "" : "";
           const {
             pgNo,
             arrival_time,
@@ -509,17 +518,38 @@ export default {
             gold_price,
             unit,
             unit_name,
+            p_cat_info,
+            p_cat_id,
+            p_budget_price,
+            p_pgNo,
+            p_num,
+            p_good_type,
+            p_good_name,
+            p_good_img,
+            p_arrtime,
           } = this.sitem;
           this.unit_name = unit_name || "";
+          console.log(fi, p_pgNo);
           this.ruleForm = {
-            pgNo: pgNo || "",
-            arrival_time: arrival_time || "",
-            budget_price: budget_price || "0.00",
-            num: num || "0",
+            p_cat_info: p_cat_info,
+            p_cat_id: p_cat_id,
+            p_budget_price: p_budget_price,
+            p_pgNo: p_pgNo,
+            p_num: p_num,
+            p_good_type: p_good_type,
+            p_good_name: p_good_name,
+            p_good_img: p_good_img,
+            p_arrtime: p_arrtime,
+            pgNo: fi === "-1" && p_pgNo ? p_pgNo : pgNo || "",
+            arrival_time:
+              fi === "-1" && p_pgNo ? p_arrtime : arrival_time || "",
+            budget_price:
+              fi === "-1" && p_pgNo ? p_budget_price : budget_price || "0.00",
+            num: fi === "-1" && p_pgNo ? p_num : num || "0",
             brand_id: brand_id ? [brand_id] : [],
-            cat_id: cat_id ? cat_id : [],
-            good_img: good_img || "",
-            good_name: good_name || "",
+            cat_id: fi === "-1" && p_pgNo ? p_cat_id : cat_id ? cat_id : [],
+            good_img: fi === "-1" && p_pgNo ? p_good_img : good_img || "",
+            good_name: fi === "-1" && p_pgNo ? p_good_name : good_name || "",
             model: model || "",
             color: color || "",
             material: material || "",

+ 5 - 14
src/views/sellOut/zixunOrder/detail.vue

@@ -5,7 +5,7 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
       <el-tabs v-model="projectTabs">
-        <el-tab-pane label="新建项目" name="0" v-if="queryType === 'add'">
+        <el-tab-pane label="新建咨询单" name="0" v-if="queryType === 'add'">
           <add-form
             v-if="newTime !== ''"
             :newTime="newTime"
@@ -15,9 +15,9 @@
             @refresh="refresh"
           />
         </el-tab-pane>
-        <el-tab-pane label="项目详情" name="1" v-if="queryType !== 'add'">
+        <el-tab-pane label="咨询单详情" name="1" v-if="queryType !== 'add'">
           <el-collapse v-model="projectNames" style="margin: -18px 0 0 0">
-            <el-collapse-item title="项目详情" name="0">
+            <el-collapse-item title="咨询单详情" name="0">
               <add-form
                 v-if="newTime !== ''"
                 :newTime="newTime"
@@ -27,16 +27,7 @@
                 @refresh="refresh"
               />
             </el-collapse-item>
-            <el-collapse-item title="设置项目毛利率" name="1">
-              <!-- <gross-form
-                v-if="newTime !== ''"
-                :newTime="newTime"
-                :id="queryId"
-                :type="queryType"
-                :sitem="sitem"
-                @refresh="initForm()"
-              /> -->
-            </el-collapse-item>
+         
             <el-collapse-item
               title="采购部定价"
               name="2"
@@ -73,7 +64,7 @@
   </div>
 </template>
    <script>
-import asyncRequest from "@/apis/service/sellOut/project";
+import asyncRequest from "@/apis/service/sellOut/zixunOrder";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import addForm from "./components/addEditForm";

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio