This commit is contained in:
aihe 2024-04-27 20:44:15 +08:00
parent 511304f1cb
commit cd88c8b121
8 changed files with 92 additions and 83 deletions

View File

@ -2,6 +2,7 @@
export const host = 'http://47.102.220.189:58089/api/bizsvr' export const host = 'http://47.102.220.189:58089/api/bizsvr'
export default { export default {
uploadFile: '/common/ossUpload',
loginByApp: `/loginByApp`, // 登录 loginByApp: `/loginByApp`, // 登录
getInfoByApp: `/getInfoByApp`,// 获取用户基本信息 getInfoByApp: `/getInfoByApp`,// 获取用户基本信息
getEmisCountry: `/emis/emisCountry/list`, // 获取国家列表 getEmisCountry: `/emis/emisCountry/list`, // 获取国家列表

View File

@ -1,9 +1,5 @@
import { import { goto } from "./untool";
goto import { showToast } from "./untool"
} from "./untool";
import {
showToast
} from "./untool"
// 请求接口 // 请求接口
function dealRequest(def, url, param) { function dealRequest(def, url, param) {

View File

@ -1,13 +1,8 @@
import { import { dealRequest } from "./manageServer"
dealRequest import { showToast } from "./untool"
} from "./manageServer" import { host } from "./api"
import {
showToast
} from "./untool"
import {
host
} from "./api"
import { getSessionXToken } from "@/session" import { getSessionXToken } from "@/session"
const coreRequestBase = (url, reqParams, options = {}, methodType = "POST") => { const coreRequestBase = (url, reqParams, options = {}, methodType = "POST") => {
const xToken = getSessionXToken() const xToken = getSessionXToken()

View File

@ -1,6 +1,7 @@
import { handleResponse } from './manageServer.js' import { handleResponse } from './manageServer.js'
import { apiUrls } from './api' //接口配置 import { apiUrls, host } from './api' //接口配置
import { showToast } from "./untool" import { showToast } from "./untool"
import { getSessionXToken } from "@/session"
const chooseFile = function (action = 'chooseImage', opt = {}) { const chooseFile = function (action = 'chooseImage', opt = {}) {
@ -32,23 +33,28 @@ const chooseFile = function (action = 'chooseImage', opt = {}) {
const doRequest = function (file) { const doRequest = function (file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const xToken = getSessionXToken()
uni.uploadFile({ uni.uploadFile({
url: `${apiUrls.uploadFile}`, url: `${host}${apiUrls.uploadFile}`,
fileType: 'image', // TODO fileType: 'image', // TODO
filePath: file, filePath: file,
name: 'file', name: 'file',
header: {
"X-Token": xToken,
},
formData: { formData: {
// 'user': 'test' // 'user': 'test'
}, },
success(res) { success(res) {
try { try {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
handleResponse(data, resolve, reject) handleResponse({ data, resolve, reject })
} catch (error) { } catch (error) {
reject() reject()
} }
}, },
fail() { fail() {
showToast("文件上传失败")
reject() reject()
} }
}) })
@ -64,7 +70,7 @@ const coreUploadFile = function (action = 'chooseImage', opt = {}) {
} }
uni.showLoading() uni.showLoading()
return doRequest(files[0]).then(res => { return doRequest(files[0]).then(res => {
return res return res.url
}).finally(()=> { }).finally(()=> {
uni.hideLoading() uni.hideLoading()
}) })
@ -83,7 +89,7 @@ const coreMultiUploadFile = async (action = 'chooseImage', opt = {})=> {
uni.showLoading() uni.showLoading()
files.map(val=>{ files.map(val=>{
const def = doRequest(val).then(res => { const def = doRequest(val).then(res => {
return res return res.url
}) })
allDef.push(def) allDef.push(def)
}) })
@ -93,7 +99,7 @@ const coreMultiUploadFile = async (action = 'chooseImage', opt = {})=> {
return resFiles return resFiles
}catch(e){ }catch(e){
uni.hideLoading() uni.hideLoading()
return files throw Error(e)
} }
} }

View File

@ -1,60 +1,43 @@
<template> <template>
<view class="edm-input-item"> <view class="edm-input-item">
<tpx-select v-model:value="submitInfo.type1" :list="packTypeList" <tpx-select v-model:value="modelInfo.packType" :list="dicData.emis_tab_packing_type"
mode="drop" customInput="true" mode="drop" customInput="true"
> >
<u-row justify="between"> <tpx-text-item label="包装类型" :value="modelInfo.packType" :list="dicData.emis_tab_packing_type"></tpx-text-item>
<text class="font-26 font-weight">包装类型</text>
<u-row justify="end" align="center">
<u-text align="right" margin="0 12rpx 0 0" size="26" text="选择包装类型"></u-text>
<u-icon size="26" name="arrow-right" color="#333"></u-icon>
</u-row>
</u-row>
</tpx-select> </tpx-select>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<tpx-select v-model:value="submitInfo.type1" :list="kuaidiTypeList" <tpx-select v-model:value="modelInfo.prepareInExpress" :list="dicData.emis_express_code"
mode="drop" customInput="true" mode="drop" customInput="true"
> >
<u-row justify="between"> <tpx-text-item label="同行快递" :value="modelInfo.prepareInExpress" :list="dicData.emis_express_code"></tpx-text-item>
<text class="font-26 font-weight">同行快递</text>
<u-row justify="end" align="center">
<u-text align="right" margin="0 12rpx 0 0" size="26" text="选择快递公司"></u-text>
<u-icon size="26" name="arrow-right" color="#333"></u-icon>
</u-row>
</u-row>
</tpx-select> </tpx-select>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<u-row justify="between"> <tpx-text-item label="快递单号">
<u-col span="4"> <template v-slot:right>
<text class="font-26 font-weight">快递单号</text> <u-input placeholder="" v-model="modelInfo.prepareInBillCode" inputAlign="right"
</u-col>
<u-col span="7">
<u-input placeholder="" v-model="value1" inputAlign="right"
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; "
></u-input> ></u-input>
</u-col> </template>
</u-row> </tpx-text-item>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<u-row justify="between"> <tpx-text-item label="是否需要代垫运费">
<u-col span="4"> <template v-slot:right>
<text class="font-26 font-weight">是否需要代垫运费</text> <u-switch v-model="modelInfo.blPrepareInFreight" active-color="#B12D29" size="34"></u-switch>
</u-col> </template>
<view> </tpx-text-item>
<u-switch v-model="value1" active-color="#B12D29" size="34"></u-switch>
</view>
</u-row>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<u-row justify="between"> <tpx-text-item label="代垫预估">
<u-col span="4"> <template v-slot:right>
<text class="font-26 font-weight">代垫预估</text> <u-input placeholder="" v-model="modelInfo.prepareInEstFee" inputAlign="right"
</u-col>
<u-col span="7">
<u-input placeholder="" v-model="value1" inputAlign="right"
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; "
> >
@ -62,36 +45,33 @@
<text class="font-26 clr-sub pl-10">元</text> <text class="font-26 clr-sub pl-10">元</text>
</template> </template>
</u-input> </u-input>
</u-col> </template>
</u-row> </tpx-text-item>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<u-row justify="between"> <tpx-text-item label="供应商">
<u-col span="4"> <template v-slot:right>
<text class="font-26 font-weight">供应商</text> <u-input placeholder="" v-model="modelInfo.prepareInSupplier" inputAlign="right"
</u-col>
<u-col span="7">
<u-input placeholder="" v-model="value1" inputAlign="right"
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; "
></u-input> ></u-input>
</u-col> </template>
</u-row> </tpx-text-item>
</view> </view>
<view class="edm-input-item"> <view class="edm-input-item">
<u-row justify="between"> <tpx-text-item label="自定义标记">
<u-col span="4"> <template v-slot:right>
<text class="font-26 font-weight">自定义标记</text> <u-input placeholder="" v-model="modelInfo.prepareInRemark" inputAlign="right"
</u-col>
<u-col span="7">
<u-input placeholder="" v-model="value1" inputAlign="right"
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;" custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
placeholder-style="color: #999; " placeholder-style="color: #999; "
></u-input> ></u-input>
</u-col> </template>
</u-row> </tpx-text-item>
</view> </view>
<view class="edm-input-item">
<!-- <view class="edm-input-item">
<u-row justify="between"> <u-row justify="between">
<u-col span="4"> <u-col span="4">
<text class="font-26 font-weight">备注</text> <text class="font-26 font-weight">备注</text>
@ -103,7 +83,8 @@
></u-input> ></u-input>
</u-col> </u-col>
</u-row> </u-row>
</view> </view> -->
</template> </template>
<script> <script>
@ -113,7 +94,10 @@
export default { export default {
computed: { computed: {
submitInfo: { dicData() {
return this.$store.getters.dicData
},
modelInfo: {
get(){ get(){
return this.value return this.value
} }

View File

@ -27,7 +27,7 @@
</view> </view>
</view> </view>
<u-button @click="handleEditGood" custom-style="border-radius: 16rpx;" type="primary" plain="true"> <u-button @click="handleEditGood" custom-style="border-radius: 16rpx;height: 66rpx;" type="primary" plain="true">
<u-row justify="center"> <u-row justify="center">
<view> <view>
<u-icon name="plus" size="30" color="#B12D29"></u-icon> <u-icon name="plus" size="30" color="#B12D29"></u-icon>

View File

@ -39,7 +39,7 @@ export const getOrderModels = () => {
"productType": undefined, // 产品 "productType": undefined, // 产品
"customsClear": undefined, // 清关方式 "customsClear": undefined, // 清关方式
"customsEclaration": undefined, // 报关方式 "customsEclaration": undefined, // 报关方式
"packType": undefined, "packType": undefined, // 包装类型
"dispatchMethod": undefined, // 派送方式 "dispatchMethod": undefined, // 派送方式
"pickupMethod": undefined, // 取件方式 "pickupMethod": undefined, // 取件方式
"pickStartDate": undefined, "pickStartDate": undefined,
@ -101,5 +101,32 @@ export const getOrderModels = () => {
// } // }
], ],
"freight": undefined, // 计费总计 "freight": undefined, // 计费总计
"cargoList": [ // 货物列表
// {
// "goodsCode": "货物代码:eg 123",
// "goodsName": "货物名称",
// "cargoQty": "货物数量: 10",
// "unit": "件",
// "price": "1.2",
// "currency": "CNY",
// "nationArea": "中国",
// "taxNo": "行邮税号",
// "hscode": "海关编码",
// "brand": "品牌",
// "material": "材质",
// "purpose": "用途",
// "ingredients": "成分",
// "goodsModel": "规格",
// "orderNum": "序号",
// "isSave": "是否保存 1-保存"
// }
],
"blPrepareInFreight": undefined, // 是否入仓代垫运费 1-是 0-否
"prepareInEstFee": undefined, // 入仓代垫运费
"prepareInRealFee": undefined, // 代垫实际运费
"prepareInExpress": undefined, // 快递公司
"prepareInBillCode": undefined, // 快递单号
"prepareInRemark": undefined, // 预入仓自定义标识
"prepareInSupplier": undefined, // 预入仓供应商
} }
} }

View File

@ -229,7 +229,7 @@
<view class="mb-20">托寄货物描述</view> <view class="mb-20">托寄货物描述</view>
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp> <bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
<view class="mt-30"> <view class="mt-30">
<bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="phName"></bpe-goodphoto-tmp> <bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="goodsPics"></bpe-goodphoto-tmp>
</view> </view>
<view class="mt-30"> <view class="mt-30">
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp> <bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>