|
|
@@ -148,7 +148,7 @@
|
|
148
|
148
|
</u-row>
|
|
149
|
149
|
|
|
150
|
150
|
<!-- 是否入库 -->
|
|
151
|
|
- <!-- <u-row class="info-row">
|
|
|
151
|
+ <u-row class="info-row">
|
|
152
|
152
|
<u-col span="12">
|
|
153
|
153
|
<view @tap="selectIsWarehouse">
|
|
154
|
154
|
<u-form-item label="是否入库" prop="isWarehouse">
|
|
|
@@ -160,7 +160,7 @@
|
|
160
|
160
|
@confirm="handleConfirmIsWarehouse" @cancel="showIsWarehousePicker = false" />
|
|
161
|
161
|
</view>
|
|
162
|
162
|
</u-col>
|
|
163
|
|
- </u-row> -->
|
|
|
163
|
+ </u-row>
|
|
164
|
164
|
|
|
165
|
165
|
<!-- 收单备注 -->
|
|
166
|
166
|
<u-row class="info-row">
|
|
|
@@ -770,63 +770,43 @@ export default {
|
|
770
|
770
|
const brandId = brandObj ? brandObj.dictValue : ''
|
|
771
|
771
|
|
|
772
|
772
|
//建立入库data
|
|
|
773
|
+ // 获取 PageThree 的高清实物图的 fileUrl 数组
|
|
|
774
|
+ // 直接使用 imageUpload 获取图片列表,与 PageThree 保持一致
|
|
|
775
|
+ let goodPicFileUrls = []
|
|
|
776
|
+ if (this.currentReceipt.id && this.orderDetail.itemBrand) {
|
|
|
777
|
+ try {
|
|
|
778
|
+ const list = await imageUpload.getFileList(
|
|
|
779
|
+ '2',
|
|
|
780
|
+ '3',
|
|
|
781
|
+ this.currentReceipt.id,
|
|
|
782
|
+ this.orderDetail.itemBrand,
|
|
|
783
|
+ this.currentReceipt.clueId
|
|
|
784
|
+ )
|
|
|
785
|
+ // 获取前6个图片的 fileUrl(与 PageThree 的 displayImages 保持一致)
|
|
|
786
|
+ // goodPicFileUrls = (list || []).slice(0, 6).map(item => item.fileUrl).filter(url => url)
|
|
|
787
|
+ goodPicFileUrls = (list || []).map(item => item.fileUrl).filter(url => url)
|
|
|
788
|
+ } catch (error) {
|
|
|
789
|
+ console.error('获取高清实物图失败:', error)
|
|
|
790
|
+ }
|
|
|
791
|
+ }
|
|
|
792
|
+
|
|
773
|
793
|
const warehouseData = {
|
|
774
|
|
- // goodPicFileList: [''],//商品图片 必填
|
|
775
|
|
- // desc: '',//商品描述 必填
|
|
|
794
|
+ goodPicFileList: goodPicFileUrls,//商品图片 page3的高清实物图的url数组
|
|
776
|
795
|
type: this.warehouseInfo.category || '',//商品分类
|
|
777
|
|
- dictLabel: this.currentReceipt.brand || '',//品牌名称 必填
|
|
778
|
|
- dictValue: brandId || '',//品牌id 必填
|
|
779
|
|
- // series: '',//系列
|
|
780
|
|
- // model: this.warehouseInfo.model||'',//型号
|
|
781
|
|
- // dialType: '',//机芯类型
|
|
782
|
|
- // caseMaterial: '',//表壳材质
|
|
783
|
|
- // dialDiameter: '',//表盘直径
|
|
784
|
|
- // material: '',//材质
|
|
785
|
|
- // size: '',//尺寸
|
|
786
|
|
- // yardage: '',//尺码
|
|
787
|
|
- // price: '',//官方指导价
|
|
788
|
|
- // productCondition: '',//商品成色 必填 1-闲置未使用 2-二手
|
|
789
|
|
- // detailPicFileList: [''],//细节图片
|
|
790
|
|
- // title: '',//商品标题
|
|
791
|
|
- // productNo: '',//商品货号
|
|
792
|
|
- // productAttribute: '1',//商品属性 必填 1-自有商品 2-寄卖商品 3-质押商品 4-其它
|
|
793
|
|
- // stock: '',//库存数量 必填
|
|
|
796
|
+ dictLabel: this.currentReceipt.brand || '',//品牌名称
|
|
|
797
|
+ dictValue: brandId || '',//品牌id
|
|
|
798
|
+ indentifyCode:this.warehouseInfo.codeStorage|| '',//独立编码
|
|
794
|
799
|
costPrice: this.computedTotalCost || '',//总成本价
|
|
795
|
|
- // peerPrice: '',//同行价格
|
|
796
|
|
- // agentPrice: '',//代理价格
|
|
797
|
|
- // salePrice: '',//销售价格
|
|
798
|
|
- // productPosition: '',//商品位置
|
|
799
|
|
- // watchYear: '',//手表年份
|
|
800
|
|
- // identifyingPerson: '',//鉴定人员
|
|
801
|
|
- // identifyingPersonId: '',//鉴定人员id
|
|
802
|
|
- // recycleType: '1',//回收类型 1-线上 2-同行 3-门店 4-其它
|
|
803
|
|
- // label: '1', 1-完美 2-普通 3-瑕疵 4-假货 5-亏损
|
|
804
|
|
- // recyclePerson: '',//回收人员
|
|
805
|
|
- // recyclePersonId: '',//回收人员id
|
|
806
|
|
- // recycleBottomDesc: '',//回收留底图描述
|
|
807
|
|
- // recycleBottomFileList: [' '],//回收留底图
|
|
808
|
800
|
recycleTime: dayjs().format('YYYY-MM-DD'),//回收时间 必填
|
|
809
|
|
- // indentifyCode: '',//独立编码
|
|
810
|
|
- // targetAudience: 'general',// general-通用 man-男 woman-女
|
|
811
|
|
- // productCard: '',//商品保卡 has-有 no-无
|
|
812
|
|
- // cardYear: '',//保卡年份 如果有商品保卡就有这个字段,如果没有商品保卡,这个字段为空
|
|
813
|
|
- // productCardPicFileList: [''],//商品保卡图片留底
|
|
814
|
|
- // productTag: '',//商品标签
|
|
815
|
|
- // productAttachment: '',//商品附件
|
|
816
|
|
- // productDesc: '',//商品备注
|
|
817
|
|
- // productDescPicFileList: [''],//商品备注图片
|
|
818
|
|
- // payType: '1',//付款方式 1:微信 2:支付宝 3:银行卡 4:现金 5:数字货币 6:挂账
|
|
819
|
|
- // submitType: 'inAndUp',//提交类型 onlyIn:仅入库 inAndUp:入库并上架
|
|
820
|
|
- // continuousWarehousing: '0',//是否连续入库 1:是 0:否
|
|
821
|
|
-
|
|
|
801
|
+ stockStatus:0//库存状态,0待入库,1已入库,因为是我们是预入库,所以是0
|
|
822
|
802
|
}
|
|
823
|
803
|
if (!this.currentReceipt.warehouseId) {
|
|
824
|
804
|
//当没有仓库id的时候调用新增仓库接口
|
|
825
|
|
- await uni.$u.api.addWarehouse(warehouseData)
|
|
|
805
|
+ await uni.$u.api.wareHouseAdd(warehouseData)
|
|
826
|
806
|
} else {
|
|
827
|
807
|
//当有仓库id的时候调用编辑仓库接口
|
|
828
|
808
|
warehouseData.id = this.currentReceipt.warehouseId
|
|
829
|
|
- await uni.$u.api.updateWarehouse(warehouseData)
|
|
|
809
|
+ await uni.$u.api.wareHouseUpdate(warehouseData)
|
|
830
|
810
|
}
|
|
831
|
811
|
} else if (this.isWarehouse == '2') {
|
|
832
|
812
|
//等于2的时候不放入仓库表
|