|
@@ -4,66 +4,613 @@
|
|
|
style="width: 100%"
|
|
|
v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
|
|
|
>
|
|
|
- <!-- <div
|
|
|
- class="detail-page-title"
|
|
|
- v-if="status === '1' && powers.some((item) => item == '082')"
|
|
|
+ <el-form
|
|
|
+ ref="ruleForm"
|
|
|
+ :model="ruleForm"
|
|
|
+ status-icon
|
|
|
+ :size="'mini'"
|
|
|
+ :rules="rulesThis"
|
|
|
+ label-width="0px"
|
|
|
>
|
|
|
- <span>采购单编号:</span><span>{{ queryId }} </span>
|
|
|
- <tolerance
|
|
|
- :newTime="newTime"
|
|
|
- v-if="newTime !== ''"
|
|
|
- :sitem="sitem"
|
|
|
- :showBtn="status === '1' && powers.some((item) => item == '082')"
|
|
|
- />
|
|
|
-
|
|
|
-
|
|
|
- </div> -->
|
|
|
- <el-tabs v-model="activeTabs">
|
|
|
- <el-tab-pane label="业务详情" name="1">
|
|
|
- <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
|
|
|
- <el-collapse-item title="平台订单信息" name="1">
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <label style="color: transparent">*</label>字段
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">文件导入数据</el-col>
|
|
|
+ <el-col :span="9">系统解析数据</el-col>
|
|
|
+ <el-col :span="11">确认后的数据</el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ importSitem &&
|
|
|
+ importSitem.platform_code &&
|
|
|
+ confirmSitem &&
|
|
|
+ confirmSitem.platform_code
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>平台订单号</div>
|
|
|
+ <div><label style="color: transparent">*</label>其他单号</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>{{ importSitem.platform_code }}</div>
|
|
|
+ <div>{{ importSitem.po_code }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9">
|
|
|
+ <div>{{ confirmSitem.platform_code }}</div>
|
|
|
+ <div>{{ confirmSitem.po_code }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="platform_code">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.platform_code"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="平台订单号"
|
|
|
+ /> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="po_code">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.po_code"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="其他单号"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>平台订单下单时间</div>
|
|
|
+ <div><label style="color: red">*</label>平台商品编号</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>{{ importSitem.platform_time }}</div>
|
|
|
+ <div>{{ importSitem.plat_code }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9"
|
|
|
+ ><div>{{ confirmSitem.platform_time }}</div>
|
|
|
+ <div>{{ confirmSitem.plat_code }}</div>
|
|
|
+ <div v-if="conGoodData && conGoodData.good_thumb_img">
|
|
|
+ <show-data-table
|
|
|
+ :sitem="conGoodData"
|
|
|
+ :columns="onlineColumns"
|
|
|
+ :border="true"
|
|
|
+ >
|
|
|
+ <template slot="good_name">
|
|
|
+ <img
|
|
|
+ v-viewer
|
|
|
+ style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
+ class="fl hover"
|
|
|
+ v-if="conGoodData.good_thumb_img"
|
|
|
+ :src="conGoodData.good_thumb_img"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <span>{{ conGoodData.good_name }}</span>
|
|
|
+ <span
|
|
|
+ v-for="(si, i) in conGoodData.speclist"
|
|
|
+ :key="si.spec_id + i"
|
|
|
+ >
|
|
|
+ <span v-if="i !== 0">-</span>
|
|
|
+ <span v-else>_</span>
|
|
|
+ <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
|
|
|
+ </span>
|
|
|
+ <el-popover placement="top" width="300" trigger="hover">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>SKU编号:</span
|
|
|
+ ><span>{{ conGoodData.skuCode }}</span>
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ v-if="
|
|
|
+ newTime !== '' &&
|
|
|
+ private_field &&
|
|
|
+ private_field.length > 0 &&
|
|
|
+ private_field.some((item) => item == '1')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span>SPU编号:</span
|
|
|
+ ><span>{{ conGoodData.spuCode }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>平台商品编码:</span
|
|
|
+ ><span>{{ conGoodData.platform_code_en }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <i
|
|
|
+ class="el-icon-warning-outline fr"
|
|
|
+ slot="reference"
|
|
|
+ ></i>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="company">
|
|
|
+ <span>{{ conGoodData.company }}</span>
|
|
|
+ <el-popover placement="top" width="300" trigger="hover">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>业务企业编号:</span
|
|
|
+ ><span>{{ conGoodData.companyNo }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <i
|
|
|
+ class="el-icon-warning-outline fr"
|
|
|
+ slot="reference"
|
|
|
+ ></i>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="cat_info">
|
|
|
+ <span
|
|
|
+ v-for="(si, sii) in conGoodData.cat_info"
|
|
|
+ :key="si + sii"
|
|
|
+ >{{ sii === 0 ? "" : "_" }}{{ si.name }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template slot="exclusive">
|
|
|
+ <span
|
|
|
+ v-for="(si, sii) in conGoodData.exclusive"
|
|
|
+ :key="si.id"
|
|
|
+ >
|
|
|
+ <span v-if="sii !== 0">/</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="is_stock">
|
|
|
+ <el-tag
|
|
|
+ :size="'mini'"
|
|
|
+ v-text="
|
|
|
+ (
|
|
|
+ options4.find(
|
|
|
+ (item) => item.id == conGoodData.is_stock
|
|
|
+ ) || {}
|
|
|
+ ).name || '--'
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </show-data-table>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="platform_time">
|
|
|
+ <el-date-picker
|
|
|
+ type="datetime"
|
|
|
+ placeholder="平台订单下单时间"
|
|
|
+ v-model="ruleForm.platform_time"
|
|
|
+ style="width: 100%"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ @change="selectTime"
|
|
|
+ >
|
|
|
+ </el-date-picker> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="plat_code">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.plat_code"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="平台商品编号"
|
|
|
+ /></el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="24"
|
|
|
+ v-if="subGoodData && subGoodData.good_thumb_img"
|
|
|
+ >
|
|
|
+ <show-data-table
|
|
|
+ :sitem="subGoodData"
|
|
|
+ :columns="onlineColumns"
|
|
|
+ :border="true"
|
|
|
+ >
|
|
|
+ <template slot="good_name">
|
|
|
+ <img
|
|
|
+ v-viewer
|
|
|
+ style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
+ class="fl"
|
|
|
+ v-if="subGoodData.good_thumb_img"
|
|
|
+ :src="subGoodData.good_thumb_img"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <span>{{ subGoodData.good_name }}</span>
|
|
|
+ <span
|
|
|
+ v-for="(si, i) in subGoodData.speclist"
|
|
|
+ :key="si.spec_id + i"
|
|
|
+ >
|
|
|
+ <span v-if="i !== 0">-</span>
|
|
|
+ <span v-else>_</span>
|
|
|
+ <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
|
|
|
+ </span>
|
|
|
+ <el-popover
|
|
|
+ placement="top"
|
|
|
+ width="300"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>SKU编号:</span
|
|
|
+ ><span>{{ subGoodData.skuCode }}</span>
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ v-if="
|
|
|
+ newTime !== '' &&
|
|
|
+ private_field &&
|
|
|
+ private_field.length > 0 &&
|
|
|
+ private_field.some((item) => item == '1')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span>SPU编号:</span
|
|
|
+ ><span>{{ subGoodData.spuCode }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>平台商品编码:</span
|
|
|
+ ><span>{{ subGoodData.platform_code_en }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <i
|
|
|
+ class="el-icon-warning-outline fr"
|
|
|
+ slot="reference"
|
|
|
+ ></i>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="company">
|
|
|
+ <span>{{ subGoodData.company }}</span>
|
|
|
+ <el-popover
|
|
|
+ placement="top"
|
|
|
+ width="300"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>业务企业编号:</span
|
|
|
+ ><span>{{ subGoodData.companyNo }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <i
|
|
|
+ class="el-icon-warning-outline fr"
|
|
|
+ slot="reference"
|
|
|
+ ></i>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ <template slot="cat_info">
|
|
|
+ <span
|
|
|
+ v-for="(si, sii) in conGoodData.cat_info"
|
|
|
+ :key="si + sii"
|
|
|
+ >{{ sii === 0 ? "" : "_" }}{{ si.name }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template slot="exclusive">
|
|
|
+ <span
|
|
|
+ v-for="(si, sii) in subGoodData.exclusive"
|
|
|
+ :key="si.id"
|
|
|
+ >
|
|
|
+ <span v-if="sii !== 0">/</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="is_stock">
|
|
|
+ <el-tag
|
|
|
+ :size="'mini'"
|
|
|
+ v-text="
|
|
|
+ (
|
|
|
+ options4.find(
|
|
|
+ (item) => item.id == subGoodData.is_stock
|
|
|
+ ) || {}
|
|
|
+ ).name || '--'
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </show-data-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>收费模式</div>
|
|
|
+ <div><label style="color: red">*</label>销售渠道</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>{{ importSitem.mode }}</div>
|
|
|
+ <div>{{ importSitem.sale_source }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9">
|
|
|
+ <div>{{ confirmSitem.mode }}</div>
|
|
|
+ <div>{{ confirmSitem.sale_source }}</div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="mode">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.mode"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="收费模式"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.label"
|
|
|
+ >
|
|
|
+ </el-option> </el-select
|
|
|
+ ></el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="sale_source">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.sale_source"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="销售渠道"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, i) in coptions"
|
|
|
+ :key="item.source + i"
|
|
|
+ :label="item.source"
|
|
|
+ :value="item.source"
|
|
|
+ >
|
|
|
+ </el-option> </el-select></el-form-item></el-col
|
|
|
+ ></el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>收货人</div>
|
|
|
+ <div><label style="color: red">*</label>收货电话</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
<el-row class="tab-title">
|
|
|
- <el-col :span="3">字段</el-col>
|
|
|
- <el-col :span="4">文件导入数据</el-col>
|
|
|
- <el-col :span="7">系统解析数据</el-col>
|
|
|
- <el-col :span="10">确认后的数据</el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>
|
|
|
+ {{ importSitem.contactor }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {{ importSitem.mobile }}
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9">
|
|
|
+ <div>
|
|
|
+ {{ confirmSitem.contactor }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ {{ confirmSitem.mobile }}
|
|
|
+ </div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="contactor">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.contactor"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="收货人"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="mobile">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.mobile"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="收货电话"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
- <el-row class="tab-title">
|
|
|
- <el-col :span="3">平台订单号</el-col>
|
|
|
- <el-col :span="4">文件导入数据</el-col>
|
|
|
- <el-col :span="7">系统解析数据</el-col>
|
|
|
- <el-col :span="10">确认后的数据</el-col>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>省市区</div>
|
|
|
+ <div><label style="color: red">*</label>详细地址</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>{{ importSitem.addr }}</div>
|
|
|
+ <div>{{ importSitem.addr }}</div></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="9">
|
|
|
+ <div>{{ confirmSitem.addr }}</div>
|
|
|
+ <div>{{ confirmSitem.addr }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="addr_code">
|
|
|
+ <select-area
|
|
|
+ :value="ruleForm.addr_code"
|
|
|
+ :size="'mini'"
|
|
|
+ placeholder="收货省市区"
|
|
|
+ @selectChange="select_area_change($event)"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="addr">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.addr"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="详细地址"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <label style="color: red">*</label>订单备注
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">{{ importSitem.order_remark }}</el-col>
|
|
|
+ <el-col :span="9">{{ confirmSitem.order_remark }}</el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item prop="order_remark">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.order_remark"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="订单备注" /></el-form-item
|
|
|
+ ></el-col>
|
|
|
</el-row>
|
|
|
- <el-row class="tab-title">
|
|
|
- <el-col :span="3">平台订单下单时间</el-col>
|
|
|
- <el-col :span="4">文件导入数据</el-col>
|
|
|
- <el-col :span="7">系统解析数据</el-col>
|
|
|
- <el-col :span="10">确认后的数据</el-col>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <div><label style="color: red">*</label>数量</div>
|
|
|
+ <div><label style="color: red">*</label>单价</div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">
|
|
|
+ <div>{{ importSitem.num }}</div>
|
|
|
+ <div>{{ importSitem.price }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="9">
|
|
|
+ <div>{{ confirmSitem.num }}</div>
|
|
|
+ <div>{{ confirmSitem.price }}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11" class="nop">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="num">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.num"
|
|
|
+ :placeholder="'数量'"
|
|
|
+ :min="0"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="0"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="''"
|
|
|
+ @reschange="number_change($event, 'num')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="border">
|
|
|
+ <el-form-item prop="price">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.price"
|
|
|
+ :placeholder="'单价'"
|
|
|
+ :min="price_min"
|
|
|
+ :disabled="false"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="number_change($event, 'price')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
- <el-row class="tab-title">
|
|
|
- <el-col :span="3">平台商品编号</el-col>
|
|
|
- <el-col :span="4">文件导入数据</el-col>
|
|
|
- <el-col :span="7">系统解析数据</el-col>
|
|
|
- <el-col :span="10">确认后的数据</el-col>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <label style="color: transparent">*</label>活动名称
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">{{ importSitem.activity_name }}</el-col>
|
|
|
+ <el-col :span="9">{{ confirmSitem.activity_name }}</el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ <el-form-item prop="activity_name">
|
|
|
+ <el-input
|
|
|
+ v-model="ruleForm.activity_name"
|
|
|
+ maxlength="100"
|
|
|
+ :disabled="isDetail"
|
|
|
+ placeholder="活动名称"
|
|
|
+ /> </el-form-item
|
|
|
+ ></el-col>
|
|
|
</el-row>
|
|
|
- <el-row class="tab-title">
|
|
|
- <el-col :span="3">销售渠道</el-col>
|
|
|
- <el-col :span="4">文件导入数据</el-col>
|
|
|
- <el-col :span="7">系统解析数据</el-col>
|
|
|
- <el-col :span="10">确认后的数据</el-col>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <label style="color: transparent">*</label>订单总金额
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main">
|
|
|
+ <el-row class="tab-title">
|
|
|
+ <el-col :span="4">{{
|
|
|
+ importSitem.before_discount_all_price
|
|
|
+ }}</el-col>
|
|
|
+ <el-col :span="9">{{
|
|
|
+ confirmSitem.before_discount_all_price
|
|
|
+ }}</el-col>
|
|
|
+ <el-col :span="11">
|
|
|
+ {{ ruleForm.before_discount_all_price }}</el-col
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- </el-collapse-item>
|
|
|
- </el-collapse>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="审批记录" name="2">
|
|
|
- <process-time-line
|
|
|
- v-if="newTime !== ''"
|
|
|
- :newTime="newTime"
|
|
|
- :type="'CGD'"
|
|
|
- :orderCode="queryId"
|
|
|
- />
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-row">
|
|
|
+ <div class="tab-item-label">
|
|
|
+ <label style="color: transparent">*</label>
|
|
|
+ </div>
|
|
|
+ <div class="tab-item-main tr">
|
|
|
+ <el-button
|
|
|
+ v-if="!isDetail"
|
|
|
+ type="primary"
|
|
|
+ @click="submitForm"
|
|
|
+ :size="'mini'"
|
|
|
+ >保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="showModelThis = false" :size="'mini'">{{
|
|
|
+ isDetail ? "关 闭" : "取 消"
|
|
|
+ }}</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<no-auth></no-auth>
|
|
@@ -74,7 +621,21 @@
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import asyncRequest from "@/apis/service/orderEntry/orderConfirm";
|
|
|
-
|
|
|
+import {
|
|
|
+ options,
|
|
|
+ ruleForm,
|
|
|
+ rules,
|
|
|
+ options1,
|
|
|
+ options2,
|
|
|
+ options3,
|
|
|
+ options4,
|
|
|
+ options5,
|
|
|
+ options6,
|
|
|
+ options7,
|
|
|
+ options8,
|
|
|
+ options9,
|
|
|
+ onlineColumns,
|
|
|
+} from "./columns";
|
|
|
export default {
|
|
|
name: "orderConfirm",
|
|
|
mixins: [mixinPage, resToken],
|
|
@@ -98,86 +659,340 @@ export default {
|
|
|
activeTabs: "1",
|
|
|
isMetal: false,
|
|
|
finishStatus: "finish",
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() > new Date().valueOf();
|
|
|
+ },
|
|
|
+ },
|
|
|
activeNames: ["0", "1", "2", "3", "4", "5", "10"],
|
|
|
- sitem: null,
|
|
|
+ importSitem: null,
|
|
|
+ confirmSitem: null,
|
|
|
+ price_min: "0",
|
|
|
+ subSitem: null,
|
|
|
+ conGoodData: null,
|
|
|
+ subGoodData: null,
|
|
|
status: "",
|
|
|
newTime: "",
|
|
|
loading: false,
|
|
|
queryId: "",
|
|
|
- ReturnAddModel: false, //采购单退货弹窗
|
|
|
+ rulesThis: {},
|
|
|
+ coptions: [],
|
|
|
+ options,
|
|
|
+ ruleForm: {},
|
|
|
+ rules,
|
|
|
+ options1,
|
|
|
+ options2,
|
|
|
+ options3,
|
|
|
+ options4,
|
|
|
+ options5,
|
|
|
+ options6,
|
|
|
+ options7,
|
|
|
+ options8,
|
|
|
+ options9,
|
|
|
+ onlineColumns,
|
|
|
+ priceLoding: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.queryId = this.$route.query.id;
|
|
|
- this.initData();
|
|
|
+ this.initForm();
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
getNewTime() {
|
|
|
this.newTime = new Date().valueOf();
|
|
|
},
|
|
|
|
|
|
- async examForm(e) {
|
|
|
- if (!this.loading) {
|
|
|
- let type = e.state === "1" ? "2" : "0";
|
|
|
- await this.setStatus(type, "提交入库方审核", e.remark);
|
|
|
- }
|
|
|
+ async initForm() {
|
|
|
+ this.loading = true;
|
|
|
+ this.rulesThis = this.rules;
|
|
|
+ await this.resetForm();
|
|
|
+ await this.initData();
|
|
|
+ this.loading = false;
|
|
|
},
|
|
|
+
|
|
|
+ async againForm(sitem) {
|
|
|
+ const {
|
|
|
+ platform_code,
|
|
|
+ po_code,
|
|
|
+ platform_time,
|
|
|
+ plat_code,
|
|
|
+ sale_source,
|
|
|
+ mode,
|
|
|
+ contactor,
|
|
|
+ mobile,
|
|
|
+ price,
|
|
|
+ num,
|
|
|
+ before_discount_all_price,
|
|
|
+ activity_name,
|
|
|
+ order_remark,
|
|
|
+ addr,
|
|
|
+ addr_code,
|
|
|
+ } = sitem;
|
|
|
+ this.ruleForm = {
|
|
|
+ id: this.queryId || "",
|
|
|
+ platform_code: platform_code || "", //平台订单号
|
|
|
+ po_code: po_code || "", //其他单号
|
|
|
+ platform_time: platform_time || "", //平台下单时间
|
|
|
+ plat_code: plat_code || "", //平台商品编号
|
|
|
+ sale_source: sale_source || "", //销售渠道
|
|
|
+ mode: mode || "", //收费模式
|
|
|
+ contactor: contactor || "", ///收货人
|
|
|
+ mobile: mobile || "", //联系电话
|
|
|
+ price: price || "", //单价
|
|
|
+ num: num || "", //数量
|
|
|
+ before_discount_all_price: before_discount_all_price || "", //优惠前总金额
|
|
|
+ activity_name: activity_name || "", //优惠活动名称
|
|
|
+ order_remark: order_remark || "", //订单备注
|
|
|
+ addr: addr || "", //联系地址
|
|
|
+ addr_code: addr_code && addr_code.length > 0 ? addr_code : [], //省市区
|
|
|
+ };
|
|
|
+ this.ruleForm.before_discount_all_price = this.accMul(
|
|
|
+ this.ruleForm.num,
|
|
|
+ this.ruleForm.price
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
async initData() {
|
|
|
this.loading = true;
|
|
|
- const res = await asyncRequest.detail({ id: this.queryId });
|
|
|
- if (res && res.code === 0 && res.data) {
|
|
|
- this.sitem = res.data;
|
|
|
- const { status, can, cgdNo } = this.sitem;
|
|
|
+ const { code, data, message } = await asyncRequest.detail({
|
|
|
+ id: this.queryId,
|
|
|
+ });
|
|
|
+ if (code === 0) {
|
|
|
+ const { status, import: simport, confirm, user_update } = data;
|
|
|
+ this.importSitem = simport ? JSON.parse(JSON.stringify(simport)) : null;
|
|
|
+ this.confirmSitem = confirm
|
|
|
+ ? JSON.parse(JSON.stringify(confirm))
|
|
|
+ : null;
|
|
|
+ this.subSitem = user_update
|
|
|
+ ? JSON.parse(JSON.stringify(user_update))
|
|
|
+ : null;
|
|
|
this.status = status;
|
|
|
- if (can && can.length > 0) {
|
|
|
- this.sitem.class_cat = "";
|
|
|
- can.forEach((x, i) => {
|
|
|
- this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
|
|
|
- });
|
|
|
+ // console.log(this.status);
|
|
|
+ if (this.confirmSitem && this.confirmSitem.plat_code) {
|
|
|
+ await this.onlineData(1, this.confirmSitem.plat_code);
|
|
|
+ if (
|
|
|
+ !(this.status === "3" || this.status === "4" || this.status === "5")
|
|
|
+ ) {
|
|
|
+ await this.againForm(this.confirmSitem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.subSitem && this.subSitem.plat_code) {
|
|
|
+ await this.onlineData(2, this.subSitem.plat_code);
|
|
|
+ if (
|
|
|
+ this.status === "3" ||
|
|
|
+ this.status === "4" ||
|
|
|
+ this.status === "5"
|
|
|
+ ) {
|
|
|
+ await this.againForm(this.subSitem);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.getNewTime();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
- async statusConfirm() {
|
|
|
- await this.$confirm(`确定已与供应商确认?`, {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(async () => {
|
|
|
- let model = {
|
|
|
- cgdNo: this.sitem.cgdNo,
|
|
|
- status: "1",
|
|
|
- };
|
|
|
- const res = await asyncRequest.status(model);
|
|
|
+ async onlineData(type, good_code) {
|
|
|
+ this.loading = true;
|
|
|
+ const { code, data, message } = await asyncRequest.good_detail({
|
|
|
+ plat_code: good_code,
|
|
|
+ });
|
|
|
+ if (code === 0) {
|
|
|
+ if (type === 1) {
|
|
|
+ this.conGoodData = data;
|
|
|
+ } else {
|
|
|
+ this.subGoodData = data;
|
|
|
+ const { platform_code } = this.subGoodData;
|
|
|
+ if (platform_code) {
|
|
|
+ await this.get_source(platform_code);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(message);
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ async get_source(platform_code) {
|
|
|
+ this.coptions = [];
|
|
|
+ const { code, data, message } = await asyncRequest.sourceList({
|
|
|
+ platform_id: platform_code,
|
|
|
+ });
|
|
|
+ if (code === 0) {
|
|
|
+ this.coptions = data;
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //省市区选择
|
|
|
+ async select_area_change(e) {
|
|
|
+ this.ruleForm.addr_code = e;
|
|
|
+ this.$refs.ruleForm.validateField("addr_code");
|
|
|
+ },
|
|
|
+ async number_change(e, key) {
|
|
|
+ this.ruleForm[key] = e + "" || "0";
|
|
|
+ this.$refs.ruleForm.validateField(key);
|
|
|
+ if (key === "num") {
|
|
|
+ await this.get_new_price();
|
|
|
+ }
|
|
|
+ this.ruleForm.before_discount_all_price = this.accMul(
|
|
|
+ this.ruleForm.num,
|
|
|
+ this.ruleForm.price
|
|
|
+ );
|
|
|
+ },
|
|
|
+ accMul(arg1, arg2) {
|
|
|
+ var m = 0,
|
|
|
+ s1 = arg1.toString(),
|
|
|
+ s2 = arg2.toString();
|
|
|
+
|
|
|
+ try {
|
|
|
+ m += s1.split(".")[1].length;
|
|
|
+ } catch (e) {}
|
|
|
+
|
|
|
+ try {
|
|
|
+ m += s2.split(".")[1].length;
|
|
|
+ } catch (e) {}
|
|
|
+
|
|
|
+ return (
|
|
|
+ (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
|
|
|
+ Math.pow(10, m)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ async get_new_price() {
|
|
|
+ const { num, activity_name } = this.ruleForm;
|
|
|
+
|
|
|
+ if (num * 1 === 0) {
|
|
|
+ this.price_min = "0";
|
|
|
+ this.ruleForm.price = "0";
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ const { skuCode: conSkuCode } = this.conGoodData;
|
|
|
+ const { skuCode: subSkuCode } = this.subGoodData;
|
|
|
+
|
|
|
+ let model = {
|
|
|
+ skuCode:
|
|
|
+ this.status === "3" || this.status === "4" || this.status === "5"
|
|
|
+ ? subSkuCode
|
|
|
+ : conSkuCode,
|
|
|
+ sale_num: num,
|
|
|
+ is_activity: activity_name ? "1" : "0",
|
|
|
+ act_code: activity_name ? activity_name : "",
|
|
|
+ };
|
|
|
+ if (!this.priceLoding) {
|
|
|
+ const { isok, price } = await this.set_salegetprice(model);
|
|
|
+ this.price_min = isok ? price : "0";
|
|
|
+ if (!isok) {
|
|
|
+ this.ruleForm.price = "0";
|
|
|
+ } else {
|
|
|
+ if (price * 1 >= this.ruleForm.price * 1)
|
|
|
+ this.ruleForm.price = price;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async resetForm() {
|
|
|
+ // 重置
|
|
|
+ await this.$nextTick(() => {
|
|
|
+ if (this.$refs.ruleForm) {
|
|
|
+ this.$refs.ruleForm.resetFields();
|
|
|
+ this.$refs.ruleForm.clearValidate();
|
|
|
+ this.ruleForm = ruleForm;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async submitForm() {
|
|
|
+ await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.loading = true;
|
|
|
+ let model = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
+ const { code, data, message } = await asyncRequest.update(model);
|
|
|
this.loading = false;
|
|
|
- if (res && res.code === 0) {
|
|
|
+ if (code === 0) {
|
|
|
this.$notify.success({
|
|
|
- title: "提交成功!",
|
|
|
+ title: "提交成功!",
|
|
|
message: "",
|
|
|
});
|
|
|
- await this.initData();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ this.initForm();
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- console.log("取消");
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ console.log("error submit!!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async set_salegetprice(model) {
|
|
|
+ this.priceLoding = true;
|
|
|
+ let resModel = {
|
|
|
+ isok: true,
|
|
|
+ price: "0",
|
|
|
+ };
|
|
|
+ // console.log(model);
|
|
|
+ let { code, message, data } = await asyncRequest.salegetprice(model);
|
|
|
+ if (code === 0) {
|
|
|
+ const { sale_price } = data;
|
|
|
+ resModel.price = sale_price + "";
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(message);
|
|
|
+ resModel.isok = false;
|
|
|
+ }
|
|
|
+ this.priceLoding = false;
|
|
|
+ return resModel;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.orderConfirm {
|
|
|
+ font-size: 13px;
|
|
|
+ color: #909399 !important;
|
|
|
+ line-height: 26px;
|
|
|
+ .tab-row {
|
|
|
+ border-left: 1px solid #ebeef5;
|
|
|
+ border-top: 1px solid #ebeef5;
|
|
|
+ display: flex;
|
|
|
+ align-items: stretch;
|
|
|
+ .tab-item-label {
|
|
|
+ padding: 4px 5px;
|
|
|
+ width: 125px;
|
|
|
+ .red {
|
|
|
+ color: red;
|
|
|
+ padding: 0 5px 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tab-item-main {
|
|
|
+ width: calc(100% - 125px);
|
|
|
+ border-left: 1px solid #ebeef5;
|
|
|
+
|
|
|
+ .tab-title {
|
|
|
+ display: flex;
|
|
|
+ align-items: stretch;
|
|
|
+ .el-col {
|
|
|
+ padding: 3px 5px;
|
|
|
+ border-right: 1px solid #ebeef5;
|
|
|
+ &.nop {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+ &.border {
|
|
|
+ border: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
|