Ver código fonte

报价管理

yuanchengman 2 anos atrás
pai
commit
f3fb400243

+ 9 - 0
src/api/quoted.js

@@ -16,3 +16,12 @@ export function getDetail (priceId) {
     method: 'get'
   })
 }
+
+// 撤回
+export function revoke (data) {
+  return request({
+    url: request.adornUrl(`/biz-service/quoted/revoke`),
+    method: 'post',
+    data: data
+  })
+}

+ 108 - 0
src/views/modules/cus/quoted-accredit.vue

@@ -0,0 +1,108 @@
+<<template>
+  <div>
+    <div class="my-title">授权</div>
+      <el-form   
+        :model="dataForm"
+        :rules="dataRule"
+        ref="dataForm"
+        label-width="160px"
+      >
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="状态" prop="state">
+              <el-select
+              v-model="dataForm.state"
+              placeholder="请选择"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in stateOption"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col>
+            <el-form-item label="授权情况" prop="accredit">
+              <el-input v-model="dataForm.accredit" placeholder="请输入" type="textarea"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+  </div>
+</template>
+
+<script>
+export default {
+  name: '',
+  components: {},
+  props: {},
+  data () {
+    return {
+      stateOption: [
+        { label: '通过', value: 1 },
+        { label: '不通过', value: 2 }
+      ],
+      dataForm: {
+        priceId: '',
+        state: '',
+        accredit: ''
+      },
+      dataRule: {
+        state: [{required: true, message: '请选择', trigger: 'change'}]
+      }
+    }
+  },
+  watch: {},
+  computed: {},
+  created () {},
+  mounted () {},
+  activated () {},
+  methods: {
+    onChose () {
+      this.$emit('onChose')
+    },
+    async init (id) {
+      this.dataForm.priceId = id
+    },
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/quoted/updateAccredit`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 3 - 0
src/views/modules/cus/quoted-add-or-update.vue

@@ -406,6 +406,9 @@ export default {
       getDetail(priceId).then(({ data }) => {
         if (data && data.code === '200') {
           this.dataForm = data.data
+          if (this.dataForm.workInfoList != null && this.dataForm.workInfoList.length > 0) {
+            this.dataForm.workInfoList.forEach(item => { item.attachList = item.attachListVo })
+          }
 
           if (this.dataForm.productId) {
             this.productIdChangeHandle(this.dataForm.productId)

+ 415 - 5
src/views/modules/cus/quoted-detail.vue

@@ -1,24 +1,434 @@
 <template>
-  <div></div>
+  <div>
+    <div class="my-title">详情</div>
+    <div style="margin-left: 20px; margin-right: 20px">
+      <e-desc title="基本信息" column="3">
+        <e-desc-item label="沟通信息">{{ dataForm.coCode }}</e-desc-item>
+        <e-desc-item label="项目名称">{{ dataForm.projectName }}</e-desc-item>
+        <e-desc-item label="项目类别">{{ dataForm.typeName }}</e-desc-item>
+        <e-desc-item label="备注" span="3">{{ dataForm.remark }}</e-desc-item>
+
+        <e-desc-item label="关联BOM物料清单">{{
+          dataForm.productName
+        }}</e-desc-item>
+      </e-desc>
+      <div class="desc">
+        <h1 class="desc-title">BOM物料明细报价</h1>
+        <el-row>
+          <el-table
+            :data="dataForm.quotedPriceProductList"
+            border
+            style="width: 100%"
+          >
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="productName"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="物料名称"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="productSpec"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="物料规格"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="mapNumber"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="主图号"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materials"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="材料"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="cnt"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="单套数量"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="unit"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="单位"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="size"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="物料尺寸"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="developedSize"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="展开尺寸"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="surfaceTreatment"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="表面处理"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="notes"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="备注"
+            >
+            </el-table-column>
+            <!-- 初次报价 -->
+            <div>
+              <el-table-column
+                prop="materialPrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="原材料费"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="processPrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="生产加工费"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="handlePrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="热表处理费"
+              >
+              </el-table-column>
+            </div>
+            <!-- 精准报价 -->
+            <div>
+              <el-table-column
+                prop="precisionMaterialPrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="精准原材料费"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="precisionProcessPrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="精准生产加工费"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="precisionHandlePrice"
+                header-align="center"
+                align="center"
+                min-width="160px"
+                label="精准热表处理费"
+              >
+              </el-table-column>
+            </div>
+          </el-table>
+        </el-row>
+      </div>
+      <div class="desc">
+        <h1 class="desc-title">任务工单派发</h1>
+        <el-row>
+          <el-table :data="dataForm.workInfoList" border style="width: 100%">
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="taskType"
+              header-align="center"
+              align="center"
+              min-width="100"
+              width="120"
+              label="工单类型"
+            >
+              <template slot-scope="scope">
+                <span>{{
+                  taskTypeOption.findIndex(
+                    (t) => t.value == scope.row.taskType
+                  ) > -1
+                    ? taskTypeOption.find((t) => t.value == scope.row.taskType)
+                        .label
+                    : ""
+                }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="taskName"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="工单名称"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="ranks"
+              header-align="center"
+              align="center"
+              width="120"
+              label="级别"
+            >
+              <template slot-scope="scope">
+                <span>{{
+                  rankTypeOption.findIndex((t) => t.value == scope.row.ranks) >
+                  -1
+                    ? rankTypeOption.find((t) => t.value == scope.row.ranks)
+                        .label
+                    : ""
+                }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="content"
+              header-align="center"
+              align="center"
+              min-width="100"
+              label="工单内容"
+              :show-tooltip-when-overflow="true"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="receiver"
+              header-align="center"
+              align="center"
+              width="150"
+              label="任务接收人"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.receiverName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="attachListVo"
+              header-align="center"
+              align="center"
+              width="150"
+              label="任务附件"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  :disabled="
+                    !scope.row.attachListVo || scope.row.attachListVo.length === 0
+                  "
+                  type="text"
+                  size="small"
+                  @click="attachDetails(scope.row.attachListVo)"
+                  >查看</el-button
+                >
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="notes"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="备注"
+            >
+            </el-table-column>
+          </el-table>
+        </el-row>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">返回</el-button>
+    </span>
+
+    <attach-detail-dialog ref="attachDetail" @onChose="onChose" />
+  </div>
 </template>
 
 <script>
+import EDesc from '../common/e-desc'
+import EDescItem from '../common/e-desc-item'
+import UploadComponent from '../common/upload-component-v2'
+import AttachDetailDialog from '../common/attach-detail-dialog'
+import { getDetail } from '@/api/quoted'
+import { getCoCode } from '@/api/cus'
+import { getProductList, getProductAllDetail } from '@/api/product'
+import {
+  productTypeOption,
+  taskTypeOption,
+  rankTypeOption
+} from '@/utils/enums'
 export default {
   name: '',
-  components: {},
+  components: { EDesc, EDescItem, UploadComponent, AttachDetailDialog },
   props: {},
   data () {
-    return {}
+    return {
+      id: 0,
+      productTypeOption: productTypeOption,
+      taskTypeOption: taskTypeOption,
+      rankTypeOption: rankTypeOption,
+      coOption: [],
+      productIdOption: [],
+      dataForm: {
+        materialCost: 0,
+        materialCostSecond: 0,
+        totalPrice: 0,
+        totalPriceSecond: 0,
+        quotedPriceProductList: [], // 报价物料清单
+        workInfoList: []
+      },
+      productList: []
+    }
   },
   watch: {},
   computed: {},
   created () {},
   mounted () {},
   activated () {},
-  methods: {}
+  methods: {
+    onChose () {
+      this.$emit('onChose')
+    },
+    async init (id) {
+      this.id = id || 0
+      await this.getCoCode()
+      await this.getProductList()
+      this.getDetail(id)
+    },
+    async getCoCode () {
+      await getCoCode().then(({ data }) => {
+        if (data && data.code === '200') {
+          this.coOption = data.data
+        }
+      })
+    },
+    async getProductList (productName) {
+      let params = {
+        current: 1,
+        size: 20,
+        productName: productName
+      }
+      await getProductList(params).then(({ data }) => {
+        if (data && data.code === '200') {
+          this.productIdOption = []
+          data.data.records.forEach((item) => {
+            this.productIdOption.push({
+              label: item.productName,
+              value: item.productId
+            })
+          })
+        }
+      })
+    },
+    getDetail (id) {
+      getDetail(id).then(({ data }) => {
+        if (data && data.code === '200') {
+          this.dataForm = data.data
+          this.dataForm.coCode = this.coOption.find(
+            (t) => t.coId === this.dataForm.coId
+          ).coCode
+          this.dataForm.typeName = this.productTypeOption.find(
+            (t) => t.value === this.dataForm.type
+          ).label
+          this.dataForm.productName = this.productIdOption.find(
+            (t) => t.value === this.dataForm.productId
+          ).label
+
+          this.productIdChangeHandle(this.dataForm.productId)
+        }
+      })
+    },
+    attachDetails (attachList) {
+      this.$refs.attachDetail.init(attachList)
+    },
+    productIdChangeHandle (val) {
+      if (val) {
+        getProductAllDetail(val).then(({ data }) => {
+          if (data && data.code === '200') {
+            this.productList = data.data
+            if (
+              this.dataForm.quotedPriceProductList == null ||
+              this.dataForm.quotedPriceProductList.length === 0
+            ) {
+              this.productList.forEach((item) => {
+                this.dataForm.quotedPriceProductList.push({
+                  productId: item.productId
+                })
+                item.id = this.dataForm.quotedPriceProductList.find(
+                  (t) => t.productId === item.productId
+                ).id
+              })
+            } else {
+              this.dataForm.quotedPriceProductList.forEach((item) => {
+                let tempItem = this.productList.find(
+                  (t) => t.productId === item.productId
+                )
+                console.log(tempItem, '111111111111')
+
+                if (tempItem) {
+                  item.productName = tempItem.productName
+                  item.productSpec = tempItem.productSpec
+                  item.mapNumber = tempItem.mapNumber
+                  item.materials = tempItem.materials
+                  item.cnt = tempItem.cnt
+                  item.unit = tempItem.unit
+                  item.size = tempItem.size
+                  item.developedSize = tempItem.developedSize
+                  item.surfaceTreatment = tempItem.surfaceTreatment
+                  item.notes = tempItem.notes
+                }
+              })
+            }
+          }
+        })
+      } else {
+        this.productList = []
+      }
+    }
+  }
 }
 </script>
 
 <style scoped>
-
+.desc .desc-title {
+  margin-bottom: 10px;
+  color: #333;
+  font-weight: 700;
+  font-size: 16px;
+  line-height: 1.5715;
+}
 </style>

+ 66 - 4
src/views/modules/cus/quoted-price.vue

@@ -188,7 +188,7 @@
             >
             </el-table-column>
             <!-- 初次报价 -->
-            <div v-if="type === 'first' || type === 'second'">
+            <div>
               <el-table-column
                 prop=""
                 header-align="center"
@@ -251,7 +251,7 @@
               </el-table-column>
             </div>
             <!-- 精准报价 -->
-            <div v-if="type === 'second'">
+            <div v-if="type === 'second' || type === 'restart'">
               <el-table-column
                 prop=""
                 header-align="center"
@@ -313,7 +313,7 @@
           </el-table>
         </el-row>
 
-        <div v-if="type === 'first' || type === 'second'">
+        <div>
           <div class="title">初次报价</div>
           <div class="template_price">
             <el-row>
@@ -376,7 +376,7 @@
           </div>
         </div>
 
-        <div v-if="type === 'second'">
+        <div v-if="type === 'second' || type === 'restart'">
           <div class="title">精准报价</div>
           <div class="template_price">
             <el-row>
@@ -637,6 +637,8 @@ export default {
         this.title = '初次报价'
       } else if (type === 'second') {
         this.title = '精准报价'
+      } else if (type === 'restart') {
+        this.title = '重新报价'
       }
     },
     getDetail (priceId) {
@@ -828,6 +830,8 @@ export default {
         this.first()
       } else if (this.type === 'second') {
         this.second()
+      } else if (this.type === 'restart') {
+        this.restart()
       }
     },
     // 初次报价
@@ -925,6 +929,64 @@ export default {
           })
         }
       })
+    },
+    // 重新报价
+    restart () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          let param = {
+            priceId: this.dataForm.priceId,
+            remark: this.dataForm.remark,
+
+            managePrice: this.dataForm.managePrice / 100,
+            mouldPrice: this.dataForm.mouldPrice,
+            ratePrice: this.dataForm.ratePrice / 100,
+            materialCost: this.dataForm.materialCost,
+            totalPrice: this.dataForm.totalPrice,
+
+            precisionManagePrice: this.dataForm.precisionManagePrice / 100,
+            precisionMouldPrice: this.dataForm.precisionMouldPrice,
+            precisionRatePrice: this.dataForm.precisionRatePrice / 100,
+            precisionMaterialCost: this.dataForm.materialCostSecond,
+            precisionTotalPrice: this.dataForm.totalPriceSecond,
+            quotedPriceProductRestartParamsList:
+              this.dataForm.quotedPriceProductList.map((item) => {
+                let temp = {
+                  id: item.id,
+                  priceId: this.id,
+                  productId: item.productId,
+                  materialPrice: item.materialPrice,
+                  processPrice: item.processPrice,
+                  handlePrice: item.handlePrice,
+                  precisionMaterialPrice: item.precisionMaterialPrice,
+                  precisionProcessPrice: item.precisionProcessPrice,
+                  precisionHandlePrice: item.precisionHandlePrice
+                }
+                return temp
+              })
+          }
+
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/quoted/updateRestart`),
+            method: 'post',
+            data: this.$http.adornData({ ...param, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
     }
   }
 }

+ 101 - 0
src/views/modules/cus/quoted-result.vue

@@ -0,0 +1,101 @@
+<<template>
+    <div>
+      <div class="my-title">报价结果</div>
+        <el-form   
+          :model="dataForm"
+          :rules="dataRule"
+          ref="dataForm"
+          label-width="160px"
+        >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="项目状态" prop="state">
+                <el-select
+                v-model="dataForm.state"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in stateOption"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+  
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="onChose">取消</el-button>
+        <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+      </span>
+    </div>
+  </template>
+  
+  <script>
+  export default {
+    name: '',
+    components: {},
+    props: {},
+    data () {
+      return {
+        stateOption: [
+          { label: '报价取消', value: 5 },
+          { label: '报价成功', value: 6 }
+        ],
+        dataForm: {
+          priceId: '',
+          state: '',
+          accredit: ''
+        },
+        dataRule: {
+          state: [{required: true, message: '请选择', trigger: 'change'}]
+        }
+      }
+    },
+    watch: {},
+    computed: {},
+    created () {},
+    mounted () {},
+    activated () {},
+    methods: {
+      onChose () {
+        this.$emit('onChose')
+      },
+      async init (id) {
+        this.dataForm.priceId = id
+      },
+      dataFormSubmit () {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            this.$http({
+              url: this.$http.adornUrl(`/biz-service/quoted/updateResult`),
+              method: 'post',
+              data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+            }).then(({ data }) => {
+              if (data && data.code === '200') {
+                this.$message({
+                  message: '操作成功',
+                  type: 'success',
+                  duration: 1500,
+                  onClose: () => {
+                    this.onChose()
+                    this.$emit('refreshDataList')
+                  }
+                })
+              } else {
+                this.$message.error(data.msg)
+              }
+            })
+          }
+        })
+      }
+    }
+  }
+  </script>
+  
+  <style scoped>
+  </style>

+ 63 - 10
src/views/modules/cus/quoted.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <template v-if="!addOrUpdateVisible && !detailVisible && !priceVisible">
+    <template v-if="!addOrUpdateVisible && !detailVisible && !priceVisible && !accreditVisible && !resultVisible">
       <el-form
         :inline="true"
         :model="dataForm"
@@ -235,7 +235,7 @@
               v-if="isAuth('quoted:revoke')"
               type="text"
               size="small"
-              @click="showDetail"
+              @click="revokeHandle(scope.row.priceId)"
               >撤回</el-button
             >
             <el-button
@@ -263,21 +263,21 @@
               v-if="isAuth('quoted:restart')"
               type="text"
               size="small"
-              @click="showDetail"
+              @click="priceHandle(scope.row.priceId, 'restart')"
               >重新报价</el-button
             >
             <el-button
-              v-if="isAuth('quoted:accredit')"
+              v-if="isAuth('quoted:accredit') && scope.row.workFlowBusinessExt != null && scope.row.workFlowBusinessExt.state === '1'"
               type="text"
               size="small"
-              @click="showDetail"
+              @click="accreditHandle(scope.row.priceId)"
               >授权</el-button
             >
             <el-button
               v-if="isAuth('quoted:result')"
               type="text"
               size="small"
-              @click="showDetail"
+              @click="resultHandle(scope.row.priceId)"
               >报价结果</el-button
             >
             <el-button
@@ -302,23 +302,31 @@
     </template>
     <quoted-add-or-update ref="addOrUpdate" v-if="addOrUpdateVisible" @onChose="onChose" @refreshDataList="queryData"/>
     <quoted-price ref="price" v-if="priceVisible" @onChose="onChose" @refreshDataList="queryData"/>
+    <quoted-detail ref="detail" v-if="detailVisible" @onChose="onChose" />
+    <quoted-accredit ref="accredit" v-if="accreditVisible" @onChose="onChose"/>
+    <quoted-result ref="result" v-if="resultVisible" @onChose="onChose"/>
   </div>
 </template>
 
 <script>
 import OrgComponent from '../common/org-component'
-import {getList} from '@/api/quoted'
+import {getList, revoke} from '@/api/quoted'
 import QuotedAddOrUpdate from './quoted-add-or-update'
 import { productTypeOption, approveStateOption, projectStateOption } from '@/utils/enums'
-import QuotedPrice from './quoted-price.vue'
+import QuotedPrice from './quoted-price'
+import QuotedDetail from './quoted-detail'
+import QuotedAccredit from './quoted-accredit'
+import QuotedResult from './quoted-result'
 export default {
   name: 'cus-quoted',
-  components: { OrgComponent, QuotedAddOrUpdate, QuotedPrice },
+  components: { OrgComponent, QuotedAddOrUpdate, QuotedPrice, QuotedDetail, QuotedAccredit, QuotedResult },
   data () {
     return {
       addOrUpdateVisible: false,
       detailVisible: false,
       priceVisible: false,
+      accreditVisible: false,
+      resultVisible: false,
       productTypeOption: productTypeOption,
       approveStateOption: approveStateOption,
       projectStateOption: projectStateOption,
@@ -338,6 +346,8 @@ export default {
       this.addOrUpdateVisible = false
       this.detailVisible = false
       this.priceVisible = false
+      this.accreditVisible = false
+      this.resultVisible = false
     },
     // 每页数
     sizeChangeHandle (val) {
@@ -384,7 +394,50 @@ export default {
         this.$refs.price.init(id, type)
       })
     },
-    showDetail () {}
+    showDetail (priceId) {
+      this.detailVisible = true
+      this.$nextTick(() => {
+        this.$refs.detail.init(priceId)
+      })
+    },
+    accreditHandle (priceId) {
+      this.accreditVisible = true
+      this.$nextTick(() => {
+        this.$refs.accredit.init(priceId)
+      })
+    },
+    revokeHandle (priceId) {
+      this.$confirm('是否确认要撤回?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        revoke({id: priceId}).then(({data}) => {
+          if (data && data.code === '200') {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            })
+          } else {
+            this.$message({
+              type: 'error',
+              message: data.msg
+            })
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消撤回'
+        })
+      })
+    },
+    resultHandle (priceId) {
+      this.resultVisible = true
+      this.$nextTick(() => {
+        this.$refs.result.init(priceId)
+      })
+    }
   }
 }
 </script>