uu
This commit is contained in:
parent
511304f1cb
commit
cd88c8b121
@ -2,6 +2,7 @@
|
||||
export const host = 'http://47.102.220.189:58089/api/bizsvr'
|
||||
|
||||
export default {
|
||||
uploadFile: '/common/ossUpload',
|
||||
loginByApp: `/loginByApp`, // 登录
|
||||
getInfoByApp: `/getInfoByApp`,// 获取用户基本信息
|
||||
getEmisCountry: `/emis/emisCountry/list`, // 获取国家列表
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import {
|
||||
goto
|
||||
} from "./untool";
|
||||
import {
|
||||
showToast
|
||||
} from "./untool"
|
||||
import { goto } from "./untool";
|
||||
import { showToast } from "./untool"
|
||||
|
||||
// 请求接口
|
||||
function dealRequest(def, url, param) {
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
import {
|
||||
dealRequest
|
||||
} from "./manageServer"
|
||||
import {
|
||||
showToast
|
||||
} from "./untool"
|
||||
import {
|
||||
host
|
||||
} from "./api"
|
||||
import { dealRequest } from "./manageServer"
|
||||
import { showToast } from "./untool"
|
||||
import { host } from "./api"
|
||||
import { getSessionXToken } from "@/session"
|
||||
|
||||
const coreRequestBase = (url, reqParams, options = {}, methodType = "POST") => {
|
||||
const xToken = getSessionXToken()
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { handleResponse } from './manageServer.js'
|
||||
import { apiUrls } from './api' //接口配置
|
||||
import { apiUrls, host } from './api' //接口配置
|
||||
import { showToast } from "./untool"
|
||||
import { getSessionXToken } from "@/session"
|
||||
|
||||
|
||||
const chooseFile = function (action = 'chooseImage', opt = {}) {
|
||||
@ -32,23 +33,28 @@ const chooseFile = function (action = 'chooseImage', opt = {}) {
|
||||
|
||||
const doRequest = function (file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const xToken = getSessionXToken()
|
||||
uni.uploadFile({
|
||||
url: `${apiUrls.uploadFile}`,
|
||||
url: `${host}${apiUrls.uploadFile}`,
|
||||
fileType: 'image', // TODO
|
||||
filePath: file,
|
||||
name: 'file',
|
||||
header: {
|
||||
"X-Token": xToken,
|
||||
},
|
||||
formData: {
|
||||
// 'user': 'test'
|
||||
},
|
||||
success(res) {
|
||||
try {
|
||||
const data = JSON.parse(res.data)
|
||||
handleResponse(data, resolve, reject)
|
||||
handleResponse({ data, resolve, reject })
|
||||
} catch (error) {
|
||||
reject()
|
||||
}
|
||||
},
|
||||
fail() {
|
||||
showToast("文件上传失败")
|
||||
reject()
|
||||
}
|
||||
})
|
||||
@ -64,7 +70,7 @@ const coreUploadFile = function (action = 'chooseImage', opt = {}) {
|
||||
}
|
||||
uni.showLoading()
|
||||
return doRequest(files[0]).then(res => {
|
||||
return res
|
||||
return res.url
|
||||
}).finally(()=> {
|
||||
uni.hideLoading()
|
||||
})
|
||||
@ -83,7 +89,7 @@ const coreMultiUploadFile = async (action = 'chooseImage', opt = {})=> {
|
||||
uni.showLoading()
|
||||
files.map(val=>{
|
||||
const def = doRequest(val).then(res => {
|
||||
return res
|
||||
return res.url
|
||||
})
|
||||
allDef.push(def)
|
||||
})
|
||||
@ -93,7 +99,7 @@ const coreMultiUploadFile = async (action = 'chooseImage', opt = {})=> {
|
||||
return resFiles
|
||||
}catch(e){
|
||||
uni.hideLoading()
|
||||
return files
|
||||
throw Error(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,60 +1,43 @@
|
||||
<template>
|
||||
<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"
|
||||
>
|
||||
<u-row justify="between">
|
||||
<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-text-item label="包装类型" :value="modelInfo.packType" :list="dicData.emis_tab_packing_type"></tpx-text-item>
|
||||
</tpx-select>
|
||||
</view>
|
||||
|
||||
<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"
|
||||
>
|
||||
<u-row justify="between">
|
||||
<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-text-item label="同行快递" :value="modelInfo.prepareInExpress" :list="dicData.emis_express_code"></tpx-text-item>
|
||||
</tpx-select>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">快递单号</text>
|
||||
</u-col>
|
||||
<u-col span="7">
|
||||
<u-input placeholder="" v-model="value1" inputAlign="right"
|
||||
<tpx-text-item label="快递单号">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="" v-model="modelInfo.prepareInBillCode" inputAlign="right"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
></u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">是否需要代垫运费</text>
|
||||
</u-col>
|
||||
<view>
|
||||
<u-switch v-model="value1" active-color="#B12D29" size="34"></u-switch>
|
||||
</view>
|
||||
</u-row>
|
||||
<tpx-text-item label="是否需要代垫运费">
|
||||
<template v-slot:right>
|
||||
<u-switch v-model="modelInfo.blPrepareInFreight" active-color="#B12D29" size="34"></u-switch>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">代垫预估</text>
|
||||
</u-col>
|
||||
<u-col span="7">
|
||||
<u-input placeholder="" v-model="value1" inputAlign="right"
|
||||
<tpx-text-item label="代垫预估">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="" v-model="modelInfo.prepareInEstFee" inputAlign="right"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
>
|
||||
@ -62,36 +45,33 @@
|
||||
<text class="font-26 clr-sub pl-10">元</text>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">供应商</text>
|
||||
</u-col>
|
||||
<u-col span="7">
|
||||
<u-input placeholder="" v-model="value1" inputAlign="right"
|
||||
<tpx-text-item label="供应商">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="" v-model="modelInfo.prepareInSupplier" inputAlign="right"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
></u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
|
||||
<view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">自定义标记</text>
|
||||
</u-col>
|
||||
<u-col span="7">
|
||||
<u-input placeholder="" v-model="value1" inputAlign="right"
|
||||
<tpx-text-item label="自定义标记">
|
||||
<template v-slot:right>
|
||||
<u-input placeholder="" v-model="modelInfo.prepareInRemark" inputAlign="right"
|
||||
custom-style="border:0;border-radius: 10rpx;background-color: #F6F6F6;padding: 11rpx 20rpx;"
|
||||
placeholder-style="color: #999; "
|
||||
></u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</template>
|
||||
</tpx-text-item>
|
||||
</view>
|
||||
<view class="edm-input-item">
|
||||
|
||||
<!-- <view class="edm-input-item">
|
||||
<u-row justify="between">
|
||||
<u-col span="4">
|
||||
<text class="font-26 font-weight">备注</text>
|
||||
@ -103,7 +83,8 @@
|
||||
></u-input>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -113,7 +94,10 @@
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
submitInfo: {
|
||||
dicData() {
|
||||
return this.$store.getters.dicData
|
||||
},
|
||||
modelInfo: {
|
||||
get(){
|
||||
return this.value
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</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">
|
||||
<view>
|
||||
<u-icon name="plus" size="30" color="#B12D29"></u-icon>
|
||||
|
||||
@ -39,7 +39,7 @@ export const getOrderModels = () => {
|
||||
"productType": undefined, // 产品
|
||||
"customsClear": undefined, // 清关方式
|
||||
"customsEclaration": undefined, // 报关方式
|
||||
"packType": undefined,
|
||||
"packType": undefined, // 包装类型
|
||||
"dispatchMethod": undefined, // 派送方式
|
||||
"pickupMethod": undefined, // 取件方式
|
||||
"pickStartDate": undefined,
|
||||
@ -101,5 +101,32 @@ export const getOrderModels = () => {
|
||||
// }
|
||||
],
|
||||
"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, // 预入仓供应商
|
||||
}
|
||||
}
|
||||
@ -229,7 +229,7 @@
|
||||
<view class="mb-20">托寄货物描述</view>
|
||||
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
|
||||
<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 class="mt-30">
|
||||
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user