完善wei订单确认

This commit is contained in:
启航 2025-10-04 15:26:51 +08:00
parent 598a56b4bc
commit f346f3750b
15 changed files with 99 additions and 123 deletions

Binary file not shown.

Binary file not shown.

View File

@ -89,7 +89,7 @@
<artifactId>open-sdk</artifactId> <artifactId>open-sdk</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.10.2.jar</systemPath> <systemPath>${project.basedir}/libs/open-sdk-1.10.4.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>

Binary file not shown.

View File

@ -23,7 +23,7 @@
<artifactId>open-sdk</artifactId> <artifactId>open-sdk</artifactId>
<version>1.0.2</version> <version>1.0.2</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/libs/open-sdk-1.10.1.jar</systemPath> <systemPath>${project.basedir}/libs/open-sdk-1.10.4.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.qihangerp.service</groupId> <groupId>cn.qihangerp.service</groupId>

View File

@ -71,8 +71,8 @@ public class WeiOrderApiController extends BaseController {
order.setOrderId(orderInfo.getOrder_id()); order.setOrderId(orderInfo.getOrder_id());
order.setShopId(params.getShopId()); order.setShopId(params.getShopId());
order.setOpenid(orderInfo.getOpenid()); order.setOpenid(orderInfo.getOpenid());
order.setCreateTime(orderInfo.getCreate_time()); order.setCreateTime(orderInfo.getCreate_time().longValue());
order.setUpdateTime(orderInfo.getUpdate_time()); order.setUpdateTime(orderInfo.getUpdate_time().longValue());
order.setUnionid(orderInfo.getUnionid()); order.setUnionid(orderInfo.getUnionid());
order.setStatus(orderInfo.getStatus()); order.setStatus(orderInfo.getStatus());
order.setAftersaleDetail(JSONObject.toJSONString(orderInfo.getAftersale_detail())); order.setAftersaleDetail(JSONObject.toJSONString(orderInfo.getAftersale_detail()));

View File

@ -41,12 +41,12 @@ public class WeiOrder implements Serializable {
/** /**
* 秒级时间戳 * 秒级时间戳
*/ */
private Integer createTime; private Long createTime;
/** /**
* 秒级时间戳 * 秒级时间戳
*/ */
private Integer updateTime; private Long updateTime;
/** /**
* *

View File

@ -62,16 +62,16 @@
>API拉取订单</el-button> >API拉取订单</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-refresh" <!-- icon="el-icon-refresh"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handlePushOms" <!-- @click="handlePushOms"-->
>重新推送选中订单到订单库</el-button> <!-- >重新推送选中订单到订单库</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -58,16 +58,16 @@
@click="handlePull" @click="handlePull"
>API拉取订单</el-button> >API拉取订单</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-refresh" <!-- icon="el-icon-refresh"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handlePushOms" <!-- @click="handlePushOms"-->
>重新推送选中订单到订单库</el-button> <!-- >重新推送选中订单到订单库</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -78,16 +78,16 @@
@click="handleAdd" @click="handleAdd"
>手动创建订单</el-button> >手动创建订单</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-refresh" <!-- icon="el-icon-refresh"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handlePushOms" <!-- @click="handlePushOms"-->
>重新推送选中订单到订单库</el-button> <!-- >重新推送选中订单到订单库</el-button>-->
</el-col> <!-- </el-col>-->
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="warning"--> <!-- type="warning"-->

View File

@ -64,16 +64,16 @@
>API拉取订单</el-button> >API拉取订单</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-refresh" <!-- icon="el-icon-refresh"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handlePushOms" <!-- @click="handlePushOms"-->
>重新推送选中订单到订单库</el-button> <!-- >重新推送选中订单到订单库</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -54,16 +54,16 @@
@click="handlePull" @click="handlePull"
>API拉取订单</el-button> >API拉取订单</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-refresh" <!-- icon="el-icon-refresh"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handlePushOms" <!-- @click="handlePushOms"-->
>重新推送选中订单到订单库</el-button> <!-- >重新推送选中订单到订单库</el-button>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -128,7 +128,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品名" align="left" width="240px" prop="title" /> <el-table-column label="商品名" align="left" width="240px" prop="title" />
<el-table-column label="SKU名" align="left" prop="skuAttrs" width="150" :show-overflow-tooltip="true"/> <el-table-column label="规格" align="left" prop="skuAttrs" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{getSkuValues(scope.row.skuAttrs)}}
</template>
</el-table-column>
<el-table-column label="Sku编码" align="left" prop="outerSkuId" width="200"/> <el-table-column label="Sku编码" align="left" prop="outerSkuId" width="200"/>
<el-table-column label="平台SkuId" align="left" prop="skuId" width="150"/> <el-table-column label="平台SkuId" align="left" prop="skuId" width="150"/>
<el-table-column label="商品数量" align="center" prop="skuCnt" width="60px"> <el-table-column label="商品数量" align="center" prop="skuCnt" width="60px">
@ -146,7 +150,7 @@
</el-table-column> </el-table-column>
<el-table-column label="订单创建时间" align="center" prop="createTime" width="180"> <el-table-column label="订单创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -250,83 +254,44 @@
<el-descriptions-item label="省市区">{{form.provinceName}}{{form.cityName}}{{form.countyName}}</el-descriptions-item> <el-descriptions-item label="省市区">{{form.provinceName}}{{form.cityName}}{{form.countyName}}</el-descriptions-item>
<el-descriptions-item label="详细地址">{{form.detailInfo}}</el-descriptions-item> <el-descriptions-item label="详细地址">{{form.detailInfo}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions title="发货信息"> <!-- <el-descriptions title="发货信息">-->
<!-- <el-descriptions-item label="发货方式"> <!-- &lt;!&ndash; <el-descriptions-item label="发货方式">-->
<el-tag v-if="form.shipType === 1" type="danger">供应商代发</el-tag> <!-- <el-tag v-if="form.shipType === 1" type="danger">供应商代发</el-tag>-->
<el-tag v-if="form.shipType === 0" type="danger">仓库发货</el-tag> <!-- <el-tag v-if="form.shipType === 0" type="danger">仓库发货</el-tag>-->
</el-descriptions-item> --> <!-- </el-descriptions-item> &ndash;&gt;-->
<el-descriptions-item label="物流公司">{{form.expressCompanyCode}}</el-descriptions-item> <!-- <el-descriptions-item label="物流公司">{{form.expressCompanyCode}}</el-descriptions-item>-->
<el-descriptions-item label="物流单号">{{form.expressTrackingNo}}</el-descriptions-item> <!-- <el-descriptions-item label="物流单号">{{form.expressTrackingNo}}</el-descriptions-item>-->
<el-descriptions-item label="发货时间"></el-descriptions-item> <!-- <el-descriptions-item label="发货时间"></el-descriptions-item>-->
</el-descriptions> <!-- </el-descriptions>-->
<el-divider content-position="center">订单商品</el-divider> <el-divider content-position="center">订单商品</el-divider>
<el-table :data="goodsList" style="margin-bottom: 10px;"> <el-table :data="form.items" style="margin-bottom: 10px;">
<el-table-column label="序号" align="center" type="index" width="50"/> <el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="商品图片" width="80"> <el-table-column label="图片" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image style="width: 70px; height: 70px" :src="scope.row.thumbImg"></el-image> <el-image style="width: 45px; height: 45px" :src="scope.row.thumbImg"></el-image>
</template>
</el-table-column>
<el-table-column label="标题" prop="title" ></el-table-column>
<el-table-column label="规格" prop="skuAttrs" >
<template slot-scope="scope">
{{getSkuValues(scope.row.skuAttrs)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品标题" prop="title" ></el-table-column>
<el-table-column label="SKU属性" prop="skuAttrs" ></el-table-column>
<el-table-column label="sku编码" prop="skuCode"></el-table-column> <el-table-column label="sku编码" prop="skuCode"></el-table-column>
<el-table-column label="单价" prop="salePrice"></el-table-column> <el-table-column label="单价" prop="salePrice">
<template slot-scope="scope">
<span>{{ amountFormatter(null,null,scope.row.salePrice/100,null) }}</span>
</template>
</el-table-column>
<el-table-column label="数量" prop="skuCnt"></el-table-column> <el-table-column label="数量" prop="skuCnt"></el-table-column>
<el-table-column label="子订单金额" prop="realPrice"></el-table-column> <el-table-column label="总金额" prop="estimatePrice">
</el-table>
<el-divider content-position="center">订单商品</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddXhsOrderItem">添加赠品</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteXhsOrderItem">删除</el-button>
</el-col>
</el-row>
<el-table :data="xhsOrderItemList" ref="xhsOrderItem" style="margin-bottom: 10px;">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="商品" prop="erpGoodsId" width="350" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.erpGoodsSpecId" filterable remote reserve-keyword placeholder="搜索商品" style="width: 330px;" <span>{{ amountFormatter(null,null,scope.row.estimatePrice/100,null) }}</span>
:remote-method="searchSku" :loading="skuListLoading" @change="skuChanage(scope.row)">
<el-option v-for="item in skuList" :key="item.id"
:label="item.name + ' - ' + item.colorValue + ' ' + item.sizeValue + ' ' + item.styleValue"
:value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="商品图片" prop="itemImage" >
<template slot-scope="scope">
<el-image style="width: 70px; height: 70px" :src="scope.row.itemImage"></el-image>
</template>
</el-table-column>
<el-table-column label="SKU编码" prop="itemSpecCode" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.itemSpecCode" placeholder="请输入规格" />
</template>
</el-table-column>
<el-table-column label="单价" prop="price">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入单价" />
</template>
</el-table-column>
<el-table-column label="数量" prop="quantity" >
<template slot-scope="scope">
<el-input v-model="scope.row.quantity" placeholder="请输入数量" @input="qtyChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="总金额" prop="itemAmount">
<template slot-scope="scope">
<el-input v-model="scope.row.itemAmount" placeholder="请输入总金额" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-form-item label="收件人姓名" prop="userName" v-if="isAudit"> <el-form-item label="收件人姓名" prop="userName" v-if="isAudit">
<el-input v-model="form.userName" placeholder="请输入收件人姓名" style="width:250px" /> <el-input v-model="form.userName" placeholder="请输入收件人姓名" style="width:250px" />
</el-form-item> </el-form-item>
@ -408,6 +373,17 @@ export default {
// this.getList(); // this.getList();
}, },
methods: { methods: {
getSkuValues(spec){
try {
// JSON
const parsedSpec = JSON.parse(spec) || [];
// 使 map value使 join()
return parsedSpec.map(item => item.attr_value).join(', ') || '';
} catch (error) {
return spec; // JSON
}
},
copyActiveCode(event,queryParams) { copyActiveCode(event,queryParams) {
console.log(queryParams) console.log(queryParams)
const clipboard = new Clipboard(".tag-copy") const clipboard = new Clipboard(".tag-copy")