|
|
|
@ -13,6 +13,9 @@ |
|
|
|
|
<u-field v-model="form.send_phone" type="number" @input="handleInput" maxlength="13" label="发货人电话" |
|
|
|
|
placeholder="请输入发货人手机号"> |
|
|
|
|
</u-field> |
|
|
|
|
<u-field v-model="form.transfer_date" @click="show=true" :disabled="true" label="调货时间" placeholder="请选择调货时间" |
|
|
|
|
right-icon="arrow-right"> |
|
|
|
|
</u-field> |
|
|
|
|
<picker @change="changeOption" mode="selector" range-key="express_name" :value="index" :range="expressList"> |
|
|
|
|
<u-field v-model="express_name" :disabled="true" label="物流公司" placeholder="请选择物流公司" |
|
|
|
|
right-icon="arrow-right"> |
|
|
|
@ -58,6 +61,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<u-picker mode="time" :params="params" v-model="show" confirm-color="#FE483B" :show-time-tag="false" |
|
|
|
|
@confirm="confirm"></u-picker> |
|
|
|
|
<view class="goods-fd"> |
|
|
|
|
<view class="btn" @click="onSubmit">保存</view> |
|
|
|
|
</view> |
|
|
|
@ -70,6 +75,15 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
show: false, |
|
|
|
|
params: { |
|
|
|
|
year: true, |
|
|
|
|
month: true, |
|
|
|
|
day: true, |
|
|
|
|
hour: true, |
|
|
|
|
minute: true, |
|
|
|
|
second: true |
|
|
|
|
}, |
|
|
|
|
send_name: '', |
|
|
|
|
express_name: '', |
|
|
|
|
form: {}, |
|
|
|
@ -93,8 +107,8 @@ |
|
|
|
|
onLoad(o) { |
|
|
|
|
this.form = JSON.parse(o.item) |
|
|
|
|
this.send_name = this.modeList[this.form.send_type].text; |
|
|
|
|
this.transferList = this.form.transfer_image_ids? this.form.transfer_image_ids:[]; |
|
|
|
|
this.chatList = this.form.chat_image_ids?this.form.chat_image_ids:[]; |
|
|
|
|
this.transferList = this.form.transfer_image_ids ? this.form.transfer_image_ids : []; |
|
|
|
|
this.chatList = this.form.chat_image_ids ? this.form.chat_image_ids : []; |
|
|
|
|
this.type = o.type |
|
|
|
|
if (this.form.transfer_image_ids) { |
|
|
|
|
let list = this.form.transfer_image_ids |
|
|
|
@ -110,6 +124,9 @@ |
|
|
|
|
}); |
|
|
|
|
this.chatList = list |
|
|
|
|
} |
|
|
|
|
if (this.form.transfer_date) { |
|
|
|
|
this.captureTime(this.form.transfer_date) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
|
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "") |
|
|
|
@ -121,6 +138,27 @@ |
|
|
|
|
this.getExpressAll() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
captureTime(fullTime) { |
|
|
|
|
var timeArr = fullTime.replace(" ", ":").replace(/\:/g, "-").split("-"); |
|
|
|
|
var nian = timeArr[0]; |
|
|
|
|
var yue = timeArr[1]; |
|
|
|
|
var ri = timeArr[2]; |
|
|
|
|
var shi = timeArr[3]; |
|
|
|
|
var fen = timeArr[4]; |
|
|
|
|
var miao = timeArr[5]; |
|
|
|
|
this.params.year = nian; |
|
|
|
|
this.params.month = yue |
|
|
|
|
this.params.day = ri |
|
|
|
|
this.params.hour = shi |
|
|
|
|
this.params.minute = fen |
|
|
|
|
this.params.second = miao |
|
|
|
|
}, |
|
|
|
|
confirm(e) { |
|
|
|
|
this.form.transfer_date = e.year + "-" + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ':' + |
|
|
|
|
e |
|
|
|
|
.second |
|
|
|
|
console.log(this.form.transfer_date) |
|
|
|
|
}, |
|
|
|
|
handleInput(e) { |
|
|
|
|
if (this.validatePhoneNumber(event.target.value)) { |
|
|
|
|
this.form.send_phone = event.target.value |
|
|
|
@ -139,7 +177,6 @@ |
|
|
|
|
}, |
|
|
|
|
// 提交信息 |
|
|
|
|
async onSubmit() { |
|
|
|
|
console.log(this.transferList) |
|
|
|
|
const that = this; |
|
|
|
|
// 转账记录 |
|
|
|
|
let trList = [] |
|
|
|
@ -155,7 +192,6 @@ |
|
|
|
|
atList.push(item.file_id) |
|
|
|
|
}); |
|
|
|
|
this.form.chat_image_id = atList.join(','); |
|
|
|
|
console.log(that.form) |
|
|
|
|
if (!that.send_name) { |
|
|
|
|
return that.$toast('请选择发货模式') |
|
|
|
|
} |
|
|
|
@ -171,6 +207,9 @@ |
|
|
|
|
if (!that.express_name) { |
|
|
|
|
return that.$toast('请选择物流公司') |
|
|
|
|
} |
|
|
|
|
if (!that.form.transfer_date) { |
|
|
|
|
return that.$toast('请选择调货时间') |
|
|
|
|
} |
|
|
|
|
if (!that.form.express_no) { |
|
|
|
|
return that.$toast('请输入物流单号') |
|
|
|
|
} |
|
|
|
@ -187,7 +226,8 @@ |
|
|
|
|
express_id: that.form.express_id, |
|
|
|
|
chat_image_id: that.form.chat_image_id, |
|
|
|
|
transfer_image_id: that.form.transfer_image_id, |
|
|
|
|
order_id: that.form.order_id |
|
|
|
|
order_id: that.form.order_id, |
|
|
|
|
transfer_date: that.form.transfer_date |
|
|
|
|
} |
|
|
|
|
let { |
|
|
|
|
status, |
|
|
|
|