|
@@ -1,307 +1,11 @@
|
|
|
<template>
|
|
|
<div v-loading="loading">
|
|
|
- <!-- {{ sitem.is_gold_price }} -->
|
|
|
- <el-form
|
|
|
- :model="addrForm"
|
|
|
- ref="addrForm"
|
|
|
- status-icon
|
|
|
- class="demo-addrForm-goodsOnline"
|
|
|
- :size="'mini'"
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="addrForm.good_ladder"
|
|
|
- :size="'mini'"
|
|
|
- border
|
|
|
- stripe
|
|
|
- max-height="300px"
|
|
|
- row-key="key"
|
|
|
- style="width: 100%; margin: 0 0 20px 0"
|
|
|
- >
|
|
|
- <el-table-column type="index" width="50" show-overflow-tooltip />
|
|
|
- <el-table-column prop="min_num" label="起订量(>=)" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'min_num'"
|
|
|
- :rules="addrRules.min_num"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <digital-input
|
|
|
- :values="scope.row.min_num"
|
|
|
- :placeholder="'起订量(>=)'"
|
|
|
- :min="0"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="0"
|
|
|
- :controls="false"
|
|
|
- :append="''"
|
|
|
- :newTime="scope.row.newTime"
|
|
|
- :size="'mini'"
|
|
|
- :disabled="!scope.row.edit"
|
|
|
- @reschange="num_change($event, 'min_num', scope.$index)"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.min_num }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="new_sale_price" show-overflow-tooltip>
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
- <span>系统售价</span>
|
|
|
- <!-- <el-popover
|
|
|
- placement="top-start"
|
|
|
- title="计算公式:"
|
|
|
- width="300"
|
|
|
- style="margin: 3px 0 0 0"
|
|
|
- class="fr"
|
|
|
- trigger="hover"
|
|
|
- ><div>
|
|
|
- <div v-if="sitem.is_gold_price === '1'">
|
|
|
- <span class="jiashu">贵金属克重</span>
|
|
|
- <span class="jiahao">*</span>
|
|
|
- <span class="jiashu">实时金价</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- <span class="jiashu">工艺费</span>
|
|
|
- <span class="jiahao">*</span>
|
|
|
- <span class="jiashu">贵金属克重</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span class="jiashu">包装费</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- <span class="jiashu">裸价</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- <span class="jiashu">加标费</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- <span class="jiashu">证书费</span>
|
|
|
- <span class="jiahao">+</span>
|
|
|
- <span class="jiashu">物流费</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <i class="el-icon-question tb-icon" slot="reference"></i>
|
|
|
- </el-popover> -->
|
|
|
- </template>
|
|
|
-
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'new_sale_price'"
|
|
|
- :rules="addrRules.new_sale_price"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-loading="scope.row.loading"
|
|
|
- v-model="scope.row.new_sale_price"
|
|
|
- placeholder="系统售价"
|
|
|
- :disabled="true"
|
|
|
- :size="'mini'"
|
|
|
- maxlength="20"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.new_sale_price }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="sale_price"
|
|
|
- label="售价"
|
|
|
- show-overflow-tooltip
|
|
|
- v-if="!(sitem && sitem.is_gold_price + '' === '1' && is_noble)"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'sale_price'"
|
|
|
- :rules="addrRules.sale_price"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <digital-input
|
|
|
- :values="scope.row.sale_price"
|
|
|
- :placeholder="'售价'"
|
|
|
- :min="0"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- :append="''"
|
|
|
- :newTime="scope.row.newTime"
|
|
|
- :size="'mini'"
|
|
|
- :disabled="!scope.row.edit"
|
|
|
- @reschange="num_change($event, 'sale_price', scope.$index)"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.sale_price }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="new_cost_fee"
|
|
|
- show-overflow-
|
|
|
- v-if="sitem && sitem.is_gold_price + '' === '1' && is_noble"
|
|
|
- label="系统工艺费"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'new_cost_fee'"
|
|
|
- :rules="addrRules.new_cost_fee"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-loading="scope.row.loading"
|
|
|
- v-model="scope.row.new_cost_fee"
|
|
|
- placeholder="工艺费"
|
|
|
- :disabled="true"
|
|
|
- :size="'mini'"
|
|
|
- maxlength="20"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.new_cost_fee }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="cost_fee"
|
|
|
- label="工艺费"
|
|
|
- show-overflow-tooltip
|
|
|
- v-if="sitem && sitem.is_gold_price === '1' && is_noble"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'cost_fee'"
|
|
|
- :rules="addrRules.cost_fee"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <digital-input
|
|
|
- :values="scope.row.cost_fee"
|
|
|
- :placeholder="'工艺费'"
|
|
|
- :min="0"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- :append="''"
|
|
|
- :newTime="scope.row.newTime"
|
|
|
- :size="'mini'"
|
|
|
- :disabled="!scope.row.edit"
|
|
|
- @reschange="num_change($event, 'cost_fee', scope.$index)"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.cost_fee }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column prop="market_price" label="市场价" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'market_price'"
|
|
|
- :rules="addrRules.market_price"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <digital-input
|
|
|
- :values="scope.row.market_price"
|
|
|
- :placeholder="'市场价'"
|
|
|
- :min="0"
|
|
|
- :max="100000000000"
|
|
|
- :position="'right'"
|
|
|
- :precision="2"
|
|
|
- :controls="false"
|
|
|
- :append="''"
|
|
|
- :newTime="scope.row.newTime"
|
|
|
- :size="'mini'"
|
|
|
- :disabled="!scope.row.edit"
|
|
|
- @reschange="num_change($event, 'market_price', scope.$index)"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.market_price }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="market_platform" label="对比平台" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'market_platform'"
|
|
|
- :rules="addrRules.market_platform"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="scope.row.market_platform"
|
|
|
- placeholder="对比平台"
|
|
|
- maxlength="50"
|
|
|
- :disabled="!scope.row.edit"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{ scope.row.market_platform }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="status" label="状态" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item
|
|
|
- v-show="scope.row.edit"
|
|
|
- :prop="'good_ladder.' + scope.$index + '.' + 'status'"
|
|
|
- :rules="addrRules.status"
|
|
|
- :size="'mini'"
|
|
|
- :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
- >
|
|
|
- <el-select v-model="scope.row.status" placeholder="状态">
|
|
|
- <el-option
|
|
|
- v-for="item in status_options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <span v-show="!scope.row.edit">{{
|
|
|
- scope.row.status == "1" ? "启用" : "禁用"
|
|
|
- }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column fixed="right">
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
- <span>操作</span>
|
|
|
- <el-tooltip effect="dark" content="添加阶梯" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-circle-plus-outline tb-icon fr"
|
|
|
- @click="openCostEdit(-1)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- content="保存"
|
|
|
- v-if="scope.row.edit"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i class="el-icon-circle-check tb-icon" @click="checkRow(scope.$index)"></i>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip effect="dark" v-else content="修改" placement="top">
|
|
|
- <i class="el-icon-edit tb-icon" @click="openCostEdit(scope.$index)"></i>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip effect="dark" content="删除" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-delete tb-icon"
|
|
|
- @click="openCostEditDelete(scope.$index)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-form>
|
|
|
<el-form
|
|
|
ref="ruleForm"
|
|
|
:model="ruleForm"
|
|
|
status-icon
|
|
|
:rules="rulesThis"
|
|
|
- :label-position="'left'"
|
|
|
+ label-width="115px"
|
|
|
class="demo-ruleForm-goodsOnline"
|
|
|
:size="'mini'"
|
|
|
>
|
|
@@ -319,30 +23,26 @@
|
|
|
}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="审核备注" prop="remark">
|
|
|
- <!-- v-if="ruleForm.state === '0'" -->
|
|
|
+ <el-form-item
|
|
|
+ label="平台商品编码"
|
|
|
+ v-if="ruleForm.state + '' === '1'"
|
|
|
+ prop="plat_code"
|
|
|
+ >
|
|
|
<el-input
|
|
|
- type="textarea"
|
|
|
- placeholder="审核备注"
|
|
|
- v-model="ruleForm.remark"
|
|
|
+ placeholder="平台商品编码"
|
|
|
+ v-model="ruleForm.plat_code"
|
|
|
:disabled="disabled"
|
|
|
- maxlength="250"
|
|
|
- show-word-limit
|
|
|
- :autosize="{ minRows: 3, maxRows: 3 }"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+ maxlength="100"
|
|
|
+ /></el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12" v-if="ruleForm.state + '' === '1'"
|
|
|
- ><el-form-item label="售价凭证类型" prop="proof_type">
|
|
|
- <el-radio-group v-model="ruleForm.proof_type" @change="set_proof_url()">
|
|
|
+ <el-col :span="12" v-if="ruleForm.state + '' === '1'">
|
|
|
+ <el-form-item label="售价凭证类型" prop="proof_type">
|
|
|
+ <el-radio-group v-model="ruleForm.proof_type">
|
|
|
<el-radio v-for="item in options" :key="item.value" :label="item.value">{{
|
|
|
item.label
|
|
|
}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
- <el-button class="fr" type="primary" @click="showVoucher = true"
|
|
|
- >查看历史凭证</el-button
|
|
|
- >
|
|
|
</el-form-item>
|
|
|
<el-form-item label="凭证文件" prop="proof_url">
|
|
|
<ul class="shangchuan-ul">
|
|
@@ -360,12 +60,19 @@
|
|
|
slot="reference"
|
|
|
></i>
|
|
|
</el-popover>
|
|
|
- <el-link
|
|
|
- :underline="false"
|
|
|
- @click="deleteUrl('1')"
|
|
|
- type="warning"
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
style="margin: 0 0 0 16px"
|
|
|
- >删除</el-link
|
|
|
+ @click="deleteUrl('1')"
|
|
|
+ icon="el-icon-close"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="fr"
|
|
|
+ type="text"
|
|
|
+ @click="showVoucher = true"
|
|
|
+ icon="el-icon-view"
|
|
|
+ >历史凭证</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
@@ -392,16 +99,23 @@
|
|
|
<li v-if="ruleForm.proof_type + '' === '2'" class="tupian">
|
|
|
<div v-if="img_url" class="clearfix">
|
|
|
<img
|
|
|
- style="width: 50px; height: 50px"
|
|
|
+ style="width: 28px; height: 28px"
|
|
|
:src="img_url"
|
|
|
- class="avatar fl"
|
|
|
+ class="avatar fl hover"
|
|
|
+ v-viewer
|
|
|
/>
|
|
|
- <el-link
|
|
|
- :underline="false"
|
|
|
- @click="deleteUrl('2')"
|
|
|
- type="warning"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
style="margin: 0 0 0 16px"
|
|
|
- >删除</el-link
|
|
|
+ @click="deleteUrl('2')"
|
|
|
+ icon="el-icon-close"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="fr"
|
|
|
+ type="text"
|
|
|
+ @click="showVoucher = true"
|
|
|
+ icon="el-icon-view"
|
|
|
+ >历史凭证</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
@@ -428,12 +142,18 @@
|
|
|
<div v-if="other_url" class="clearfix">
|
|
|
<a :href="other_url" download="凭证文件">点击下载</a>
|
|
|
|
|
|
- <el-link
|
|
|
- :underline="false"
|
|
|
- @click="deleteUrl('3')"
|
|
|
- type="warning"
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
style="margin: 0 0 0 16px"
|
|
|
- >删除</el-link
|
|
|
+ @click="deleteUrl('3')"
|
|
|
+ icon="el-icon-close"
|
|
|
+ ></el-button>
|
|
|
+ <el-button
|
|
|
+ class="fr"
|
|
|
+ type="text"
|
|
|
+ @click="showVoucher = true"
|
|
|
+ icon="el-icon-view"
|
|
|
+ >历史凭证</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
@@ -464,23 +184,88 @@
|
|
|
@searchChange="resvoucher"
|
|
|
/>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item class="fr">
|
|
|
- <el-button
|
|
|
- v-if="!isDetail && ruleForm.state !== '1'"
|
|
|
- :size="'mini'"
|
|
|
- type="primary"
|
|
|
- @click="rejectRe('')"
|
|
|
- >驳回重新审核
|
|
|
- </el-button>
|
|
|
- <el-button v-if="!isDetail" :size="'mini'" type="primary" @click="submitForm"
|
|
|
- >保 存
|
|
|
- </el-button>
|
|
|
+ <el-form-item label="审核备注" prop="remark">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ placeholder="审核备注"
|
|
|
+ v-model="ruleForm.remark"
|
|
|
+ :disabled="disabled"
|
|
|
+ maxlength="250"
|
|
|
+ show-word-limit
|
|
|
+ :autosize="{ minRows: 3, maxRows: 3 }"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
+ <el-form
|
|
|
+ v-if="ruleForm.state + '' === '1'"
|
|
|
+ :model="addrForm"
|
|
|
+ ref="addrForm"
|
|
|
+ status-icon
|
|
|
+ class="demo-addrForm-goodsOnline"
|
|
|
+ :size="'mini'"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="addrForm.good_ladder"
|
|
|
+ :size="'mini'"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ max-height="300px"
|
|
|
+ row-key="key"
|
|
|
+ style="width: 100%; margin: 0 0 20px 0"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="行数" width="100" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="min_num" label="起订量(>=)" show-overflow-tooltip />
|
|
|
+ <el-table-column
|
|
|
+ prop="new_sale_price"
|
|
|
+ v-if="!(sitem && sitem.is_gold_price + '' === '1' && is_noble)"
|
|
|
+ label="系统售价"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ prop="new_cost_fee"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="sitem && sitem.is_gold_price + '' === '1' && is_noble"
|
|
|
+ label="系统工艺费"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-table-column prop="market_price" label="市场价" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <digital-input
|
|
|
+ :values="scope.row.market_price"
|
|
|
+ :placeholder="'市场价'"
|
|
|
+ :min="0"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :controls="false"
|
|
|
+ :append="''"
|
|
|
+ :newTime="scope.row.newTime"
|
|
|
+ :size="'mini'"
|
|
|
+ @reschange="num_change($event, 'market_price', scope.$index)"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="market_platform" label="对比平台" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.market_platform"
|
|
|
+ placeholder="对比平台"
|
|
|
+ maxlength="50"
|
|
|
+ :size="'mini'"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+ <div class="tr">
|
|
|
+ <el-button v-if="!isDetail" :size="'mini'" type="primary" @click="submitForm"
|
|
|
+ >保 存
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -545,6 +330,7 @@ export default {
|
|
|
};
|
|
|
return {
|
|
|
loading: false,
|
|
|
+ companyNo: "",
|
|
|
platform_id: "",
|
|
|
stateList: [
|
|
|
{
|
|
@@ -597,6 +383,7 @@ export default {
|
|
|
ruleForm: {
|
|
|
skuCode: "",
|
|
|
numStatus: "",
|
|
|
+ plat_code: "",
|
|
|
state: "1", //通过or驳回
|
|
|
proof_type: "1", //
|
|
|
proof_url: "", //驳回至
|
|
@@ -632,6 +419,13 @@ export default {
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
+ plat_code: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请输入平台商品编号",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
remark: [
|
|
|
{ required: true, message: "请输入审核备注", trigger: "blur" },
|
|
|
{
|
|
@@ -647,33 +441,6 @@ export default {
|
|
|
},
|
|
|
good_ladder: [],
|
|
|
addrRules: {
|
|
|
- min_num: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- validator: validate_num_0,
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- new_sale_price: [{ required: false }],
|
|
|
- sale_price: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- trigger: "blur",
|
|
|
- validator: validate_num,
|
|
|
- },
|
|
|
- ],
|
|
|
- cost_fee: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- trigger: "blur",
|
|
|
- validator: validate_num,
|
|
|
- },
|
|
|
- ],
|
|
|
- new_cost_fee: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- },
|
|
|
- ],
|
|
|
market_price: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -689,13 +456,6 @@ export default {
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- status: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "状态不能为空",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
- ],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -716,21 +476,7 @@ export default {
|
|
|
this.initForm();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 点击驳回重新审核或驳回并下线按钮
|
|
|
- async rejectRe(numStatus) {
|
|
|
- this.ruleForm.numStatus = numStatus;
|
|
|
- await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
- if (valid) {
|
|
|
- console.log(valid);
|
|
|
- this.$emit("searchChange", this.ruleForm);
|
|
|
- } else {
|
|
|
- console.log("error submit!!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
async initForm() {
|
|
|
- console.log(this.spuCode);
|
|
|
this.loading = true;
|
|
|
await this.resetForm();
|
|
|
this.rulesThis = this.rules;
|
|
@@ -747,37 +493,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- openCostEdit(index) {
|
|
|
- let findex = this.addrForm.good_ladder.findIndex((v) => v.edit === true);
|
|
|
- if (findex !== -1) {
|
|
|
- this.$message.warning("当前已有阶梯售价在编辑,请保存后再试!");
|
|
|
- return;
|
|
|
- } else {
|
|
|
- if (index === -1) {
|
|
|
- this.addrForm.good_ladder.push({
|
|
|
- edit: true,
|
|
|
- min_num: "0",
|
|
|
- new_sale_price: "0",
|
|
|
- new_cost_fee: "0",
|
|
|
- sale_price: "0",
|
|
|
- cost_fee: "0",
|
|
|
- market_price: "0",
|
|
|
- market_platform: "",
|
|
|
- status: "1",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.addrForm.good_ladder[index].edit = true;
|
|
|
- this.addrForm.good_ladder[index].newTime = new Date().valueOf() + "";
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
async get_new(index) {
|
|
|
const { min_num } = this.addrForm.good_ladder[index];
|
|
|
this.addrForm.good_ladder[index].search_loading = true;
|
|
|
+ console.log(this.companyNo);
|
|
|
let { code, data, message } = await asyncRequest.goodupprice({
|
|
|
min_num: min_num,
|
|
|
spuCode: this.spuCode,
|
|
|
platform_id: this.platform_id,
|
|
|
+ relaComNo: this.companyNo,
|
|
|
+ needRela: true,
|
|
|
});
|
|
|
let resModel = {
|
|
|
isok: code,
|
|
@@ -788,41 +513,7 @@ export default {
|
|
|
this.addrForm.good_ladder[index].search_loading = false;
|
|
|
return resModel;
|
|
|
},
|
|
|
- //保存某一行
|
|
|
- async checkRow(rowIndex) {
|
|
|
- await this.$refs.addrForm.validate(async (valid) => {
|
|
|
- if (valid) {
|
|
|
- if (!this.addrForm.good_ladder[rowIndex].search_loading) {
|
|
|
- const { min_num } = this.addrForm.good_ladder[rowIndex];
|
|
|
- let findex = this.addrForm.good_ladder.findIndex(
|
|
|
- (v) => v.edit !== true && v.min_num + "" === min_num + ""
|
|
|
- );
|
|
|
- if (findex !== -1) {
|
|
|
- this.$message.warning("当前已有相同起订量的销售价!");
|
|
|
- return;
|
|
|
- }
|
|
|
- let { isok, price, message, new_cost_fee } = await this.get_new(rowIndex);
|
|
|
- if (isok === 0) {
|
|
|
- this.addrForm.good_ladder[rowIndex].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
|
|
|
- this.addrForm.good_ladder[rowIndex].edit = false;
|
|
|
- } else if (isok >= 100 && isok <= 104) {
|
|
|
- await this.logout();
|
|
|
- } else {
|
|
|
- this.addrForm.good_ladder[rowIndex].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[rowIndex].new_cost_fee = new_cost_fee;
|
|
|
- this.$message.warning(message);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- console.log("error submit!!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- openCostEditDelete(index) {
|
|
|
- this.addrForm.good_ladder.splice(index, 1);
|
|
|
- },
|
|
|
+
|
|
|
async num_change(e, key, index) {
|
|
|
const resNum = e ?? "";
|
|
|
this.addrForm.good_ladder[index][key] = resNum === "" ? "0" : resNum;
|
|
@@ -834,13 +525,11 @@ export default {
|
|
|
if (!this.addrForm.good_ladder[index].search_loading) {
|
|
|
let { isok, price, message, new_cost_fee } = await this.get_new(index);
|
|
|
if (isok === 0) {
|
|
|
- this.addrForm.good_ladder[index].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
|
|
|
+ this.set_ladder_item(index, price, new_cost_fee);
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.addrForm.good_ladder[index].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[index].new_cost_fee = new_cost_fee;
|
|
|
+ this.set_ladder_item(index, price, new_cost_fee);
|
|
|
this.$message.warning(message);
|
|
|
}
|
|
|
}
|
|
@@ -857,7 +546,14 @@ export default {
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
this.$refs.addrForm.resetFields();
|
|
|
this.$refs.addrForm.clearValidate();
|
|
|
- let { proof, ladderlist, cat_info, platform_id } = this.sitem;
|
|
|
+ let {
|
|
|
+ proof,
|
|
|
+ nakelist,
|
|
|
+ ladderlist,
|
|
|
+ cat_info,
|
|
|
+ platform_id,
|
|
|
+ companyNo,
|
|
|
+ } = this.sitem;
|
|
|
// console.log(platform_id);
|
|
|
this.platform_id = platform_id;
|
|
|
if (cat_info && cat_info.length > 0) {
|
|
@@ -867,12 +563,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- ladderlist.map((a) => {
|
|
|
- a.search_loading = false;
|
|
|
- a.new_sale_price = "0";
|
|
|
- a.newTime = new Date().valueOf() + "";
|
|
|
- a.edit = false;
|
|
|
- return a;
|
|
|
+ this.companyNo = companyNo;
|
|
|
+ let listAll = [];
|
|
|
+ // nakelist.forEach((e) => {
|
|
|
+ // listAll.push({ min_num: e.min_num });
|
|
|
+ // });
|
|
|
+ let index = -1;
|
|
|
+ nakelist.forEach((e, ei) => {
|
|
|
+ index = ladderlist.findIndex((s) => Number(s.min_num) === Number(e.min_num));
|
|
|
+ listAll.push({
|
|
|
+ id: index != -1 ? ladderlist[index].id : "",
|
|
|
+ min_num: index != -1 ? ladderlist[index].min_num : e.min_num,
|
|
|
+ market_price: index != -1 ? ladderlist[index].market_price : "",
|
|
|
+ market_platform: index != -1 ? ladderlist[index].market_platform : "",
|
|
|
+ newTime: new Date().valueOf() + "",
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
this.ruleForm = {
|
|
@@ -883,56 +588,51 @@ export default {
|
|
|
proof_type: proof && proof.proof_type ? proof.proof_type : "1", // 通过or驳回
|
|
|
proof_url: proof && proof.proof_url ? proof.proof_url : "", //驳回至
|
|
|
};
|
|
|
+ this.good_ladder =
|
|
|
+ listAll && listAll.length > 0 ? JSON.parse(JSON.stringify(listAll)) : [];
|
|
|
this.addrForm = {
|
|
|
good_ladder:
|
|
|
- ladderlist && ladderlist.length > 0
|
|
|
- ? JSON.parse(JSON.stringify(ladderlist))
|
|
|
- : [],
|
|
|
+ listAll && listAll.length > 0 ? JSON.parse(JSON.stringify(listAll)) : [],
|
|
|
};
|
|
|
- this.good_ladder =
|
|
|
- ladderlist && ladderlist.length > 0
|
|
|
- ? JSON.parse(JSON.stringify(ladderlist))
|
|
|
- : [];
|
|
|
- // console.log(this.ruleForm.proof_url);
|
|
|
- switch (this.ruleForm.proof_type) {
|
|
|
- case "1":
|
|
|
- this.video_url = this.ruleForm.proof_url;
|
|
|
- break;
|
|
|
- case "2":
|
|
|
- this.img_url = this.ruleForm.proof_url;
|
|
|
- break;
|
|
|
- case "3":
|
|
|
- this.other_url = this.ruleForm.proof_url;
|
|
|
- break;
|
|
|
- default:
|
|
|
- this.video_url = this.ruleForm.proof_url;
|
|
|
- }
|
|
|
- this.$refs.ruleForm.validateField("proof_url");
|
|
|
+
|
|
|
+ this.set_file_url(this.ruleForm.proof_type, this.ruleForm.proof_url);
|
|
|
for (let i = 0; i < this.addrForm.good_ladder.length; i++) {
|
|
|
let { isok, price, new_cost_fee, message } = await this.get_new(i);
|
|
|
if (isok === 0) {
|
|
|
- this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
- this.addrForm.good_ladder[i].edit = false;
|
|
|
+ this.set_ladder_item(i, price, new_cost_fee);
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
- this.addrForm.good_ladder[i].edit = true;
|
|
|
- this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
|
|
|
+ this.set_ladder_item(i, price, new_cost_fee);
|
|
|
this.$message.warning(message);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ set_file_url(type, url) {
|
|
|
+ switch (type) {
|
|
|
+ case "1":
|
|
|
+ this.video_url = url;
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ this.img_url = url;
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ this.other_url = url;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.video_url = url;
|
|
|
+ }
|
|
|
+ this.$refs.ruleForm.validateField("proof_url");
|
|
|
+ },
|
|
|
async submitForm() {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
if (!this.loading) {
|
|
|
let model = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
const { state } = model;
|
|
|
+ console.log(state);
|
|
|
if (state + "" === "1") {
|
|
|
this.loading = true;
|
|
|
if (this.addrForm.good_ladder.length === 0) {
|
|
@@ -941,34 +641,18 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
let list = JSON.parse(JSON.stringify(this.addrForm.good_ladder));
|
|
|
- let isedit = false;
|
|
|
- list.forEach((v) => {
|
|
|
- if (v.edit) {
|
|
|
- isedit = true;
|
|
|
- }
|
|
|
- });
|
|
|
- if (isedit) {
|
|
|
- this.$message.warning("请保存阶梯售价!");
|
|
|
- this.loading = false;
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
let all_is_ok = true;
|
|
|
for (let i = 0; i < this.addrForm.good_ladder; i++) {
|
|
|
this.addrForm.good_ladder[i].search_loading = true;
|
|
|
let { isok, price, new_cost_fee } = await this.get_new(i);
|
|
|
if (isok === 0) {
|
|
|
- this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
- this.addrForm.good_ladder[i].this.addrForm.good_ladder[i].edit = false;
|
|
|
+ this.set_ladder_item(i, price, new_cost_fee);
|
|
|
} else if (isok >= 100 && isok <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
all_is_ok = false;
|
|
|
- this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
- this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
- this.addrForm.good_ladder[i].edit = true;
|
|
|
- this.addrForm.good_ladder[i].newTime = new Date().valueOf() + "";
|
|
|
+ this.set_ladder_item(i, price, new_cost_fee);
|
|
|
}
|
|
|
}
|
|
|
if (!all_is_ok) {
|
|
@@ -997,7 +681,7 @@ export default {
|
|
|
model.exam_remark = model.remark;
|
|
|
delete model["remark"];
|
|
|
} else {
|
|
|
- model.numStatus = "7";
|
|
|
+ model.numStatus = "4";
|
|
|
this.$emit("rejectRes", model);
|
|
|
}
|
|
|
}
|
|
@@ -1007,7 +691,14 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ set_ladder_item(i, price, new_cost_fee) {
|
|
|
+ this.addrForm.good_ladder[i].new_sale_price = price;
|
|
|
+ this.addrForm.good_ladder[i].new_cost_fee = new_cost_fee;
|
|
|
+ this.addrForm.good_ladder[i].newTime = new Date().valueOf() + Math.random();
|
|
|
+ this.$set(this.addrForm.good_ladder, i, this.addrForm.good_ladder[i]);
|
|
|
+ },
|
|
|
async successHttp(model) {
|
|
|
+ console.log(model);
|
|
|
const { code, message } = await asyncRequest.ladderOne(model);
|
|
|
this.loading = false;
|
|
|
if (code === 0) {
|