|
|
|
@ -10,7 +10,20 @@
|
|
|
|
|
</template>
|
|
|
|
|
</title-block>
|
|
|
|
|
<div class="content2">
|
|
|
|
|
<image :src="info.artworkImg"></image>
|
|
|
|
|
<u-upload
|
|
|
|
|
:fileList="fileList1"
|
|
|
|
|
@afterRead="afterRead"
|
|
|
|
|
@delete="deletePic"
|
|
|
|
|
name="6"
|
|
|
|
|
multiple
|
|
|
|
|
:maxCount="1"
|
|
|
|
|
width="250"
|
|
|
|
|
height="150"
|
|
|
|
|
>
|
|
|
|
|
<image src="https://cdn.uviewui.com/uview/demo/upload/positive.png"
|
|
|
|
|
mode="widthFix" style="width: 404rpx;height: 306rpx;"></image>
|
|
|
|
|
</u-upload>
|
|
|
|
|
<!-- <image :src="info.artworkImg"></image>-->
|
|
|
|
|
</div>
|
|
|
|
|
<tm-poup height="700" v-model="show_2" position="bottom">
|
|
|
|
|
<div class="poup1">
|
|
|
|
@ -103,7 +116,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作编号</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkNum"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="info.artworkNum" placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkNum"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -111,7 +124,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作名称</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkName"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="info.artworkName" placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkName"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4"></div>
|
|
|
|
|
</div>
|
|
|
|
@ -119,7 +132,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画家名称</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artistName"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="info.artistName" placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artistName"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrap1_1_4">
|
|
|
|
|
</div>
|
|
|
|
@ -128,7 +141,7 @@
|
|
|
|
|
<div class="wrap1_1_1">画作平尺数</div>
|
|
|
|
|
<div class="wrap1_1_2"></div>
|
|
|
|
|
<div class="wrap1_1_3">
|
|
|
|
|
<input placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkSquareSize"/>
|
|
|
|
|
<input style="color: #939393;font-size: 24rpx;" v-model="info.artworkSquareSize" placeholder-style="color: #939393;font-size: 24rpx;" :placeholder="info.artworkSquareSize"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -173,8 +186,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import http from "@/http/api";
|
|
|
|
|
import {postDataByParams} from "../../http/service";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "order-details",
|
|
|
|
|
data() {
|
|
|
|
@ -195,6 +208,7 @@ export default {
|
|
|
|
|
days.push(i)
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
fileList1:[],
|
|
|
|
|
dayMoney:'',
|
|
|
|
|
expectedPayment:'',
|
|
|
|
|
warehouseID: '',
|
|
|
|
@ -239,16 +253,60 @@ export default {
|
|
|
|
|
this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()]
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
uploadFilePromise(url, type = null) {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
uni.uploadFile({
|
|
|
|
|
url: http.baseUrl + "/api/wxuser/uploadpic",
|
|
|
|
|
filePath: url,
|
|
|
|
|
name: "file",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log(res,'res')
|
|
|
|
|
const { path } = JSON.parse(res.data).data;
|
|
|
|
|
resolve(path);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 删除图片
|
|
|
|
|
deletePic(event) {
|
|
|
|
|
this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
|
|
},
|
|
|
|
|
// 新增图片
|
|
|
|
|
async afterRead(event) {
|
|
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
|
|
let lists = [].concat(event.file)
|
|
|
|
|
let fileListLen = this[`fileList1`].length
|
|
|
|
|
lists.map((item) => {
|
|
|
|
|
this[`fileList1`].push({
|
|
|
|
|
...item,
|
|
|
|
|
status: 'uploading',
|
|
|
|
|
message: '上传中'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
|
|
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
|
|
|
|
console.log(result)
|
|
|
|
|
let item = this[`fileList1`][fileListLen]
|
|
|
|
|
this[`fileList1`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
|
status: 'success',
|
|
|
|
|
message: '',
|
|
|
|
|
url: result
|
|
|
|
|
}))
|
|
|
|
|
fileListLen++
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async signContract(){
|
|
|
|
|
|
|
|
|
|
const data={
|
|
|
|
|
cycleId:this.cycleId,
|
|
|
|
|
warehouseID:this.warehouseID,
|
|
|
|
|
artworkSquareSize:this.info.artworkSquareSize
|
|
|
|
|
artworkSquareSize:Number(this.info.artworkSquareSize)
|
|
|
|
|
}
|
|
|
|
|
const res = await postDataByParams('/api/warehouse/fdd/contract/h5',data)
|
|
|
|
|
if (res.code===200){
|
|
|
|
|
uni.setStorageSync("jumpUrl", res.data.jumpUrl)
|
|
|
|
|
this.info.artworkImg=this.fileList1[0].url
|
|
|
|
|
uni.setStorageSync("orderingInfo", {
|
|
|
|
|
cycleID:this.cycleId,
|
|
|
|
|
warehouseID:this.warehouseID,
|
|
|
|
@ -268,7 +326,7 @@ export default {
|
|
|
|
|
async obtainAmount(){
|
|
|
|
|
const data={
|
|
|
|
|
cycleID:this.cycleId,
|
|
|
|
|
artworkSquareSize:this.info.artworkSquareSize
|
|
|
|
|
artworkSquareSize:Number(this.info.artworkSquareSize)
|
|
|
|
|
}
|
|
|
|
|
const res = await postDataByParams('/api/warehouse/calculate',data)
|
|
|
|
|
if (res.code===200){
|
|
|
|
@ -307,6 +365,7 @@ export default {
|
|
|
|
|
const res = await postDataByParams('/api/warehouse/ocr', data)
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.info = res.data
|
|
|
|
|
this.fileList1=[{url:this.info.artworkImg}]
|
|
|
|
|
} else {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.msg,
|
|
|
|
|