zouyanyan 1 month ago
commit 7170a4ddbb

@ -217,7 +217,15 @@
<view class="list-container" v-if="pallet&&pallet.instdetailList"> <view class="list-container" v-if="pallet&&pallet.instdetailList">
<view v-for="(item, index) in pallet.instdetailList" :key="index" class="list-item"> <view v-for="(item, index) in pallet.instdetailList" :key="index" class="list-item">
<view class="item-header" @click="gotocxDetail(item.instno,item.project)"> <view class="item-header" @click="()=>{
let code=item.instno;
let type='2'
if(!code){
code=item.dwgn
type='1'
}
gotocxDetail(code,item.project,type)
}">
<text class="item-tip">{{ item.groupDesc }} ({{ item.qty?parseInt(item.qty):'0'}})</text> <text class="item-tip">{{ item.groupDesc }} ({{ item.qty?parseInt(item.qty):'0'}})</text>
</view> </view>
@ -433,9 +441,9 @@
immediate: true, // immediate: true, //
}, },
methods: { methods: {
gotocxDetail(instno,project){ gotocxDetail(instno,project,type){
uni.navigateTo({ uni.navigateTo({
url: `/pages/pallet/tpcxtk?instno=${instno}&project=${project}` url: `/pages/pallet/tpcxtk?instno=${instno}&project=${project}&type={type}`
}); });
}, },
_initDetail(palletAll = this.palletAll) { _initDetail(palletAll = this.palletAll) {

@ -58,10 +58,10 @@
</view> </view>
</view> </view>
</template> </template>
<u-upload ref="uUpload" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" :max-count="3" :width="100" :height="100" <!-- <u-upload ref="uUpload" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" :max-count="3" :width="100" :height="100"
:deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;" :deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;"
@on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files"> @on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files">
</u-upload> </u-upload>-->
</uni-collapse-item> </uni-collapse-item>
</u-checkbox-group> </u-checkbox-group>
</uni-collapse> </uni-collapse>
@ -386,7 +386,10 @@ export default {
// console.log(Compressor) // console.log(Compressor)
const Compressor1 = new Compressor(file, { const Compressor1 = new Compressor(file, {
quality: 0.3, // 0-1 quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024) convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => { success: (compressedFile) => {
// console.log("compressedFile",compressedFile) // console.log("compressedFile",compressedFile)
// base64 // base64

@ -128,7 +128,7 @@
<view class="list-title"><text style="color: #fa3534;">*</text>配送单照片</view> <view class="list-title"><text style="color: #fa3534;">*</text>配送单照片</view>
<view class="devpicon"> <view class="devpicon">
<u-upload ref="uUploadps" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" max-count="3" :width="100" :height="100" <u-upload ref="uUploadps" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" max-count="3" :width="100" :height="100"
@on-remove="onRemovePS" @on-choose-complete="onChooseCompletePS" :file-list="itemList.deliveryPhoto" @on-remove="onRemovePS" @on-choose-complete="onChooseCompletePS" :file-list="itemList.deliveryPhoto0"
:deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;"> :deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;">
</u-upload> </u-upload>
</view> </view>
@ -404,6 +404,7 @@ export default {
deliveryCar:'',// deliveryCar:'',//
files: [], files: [],
deliveryPhoto:[], // deliveryPhoto:[], //
deliveryPhoto0:[],
departCode:"", departCode:"",
workshop:"", workshop:"",
location:"", location:"",
@ -600,7 +601,10 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
new Compressor(file, { new Compressor(file, {
quality: 0.3, // 0-1 quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024) convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => { success: (compressedFile) => {
// base64 // base64
const reader = new FileReader(); const reader = new FileReader();
@ -668,7 +672,7 @@ export default {
const base64 = evt.target.result.substr(22) const base64 = evt.target.result.substr(22)
console.log("base64",base64) console.log("base64",base64)
resolve(base64) resolve(base64)
that.itemList.deliveryPhoto[index]['url']="data:image/png;base64"+base64; that.itemList.deliveryPhoto0[index]['url']="data:image/png;base64"+base64;
that.$forceUpdate(); that.$forceUpdate();
}; };
@ -689,14 +693,17 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
new Compressor(file, { new Compressor(file, {
quality: 0.3, // 0-1 quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024) convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => { success: (compressedFile) => {
// base64 // base64
const reader = new FileReader(); const reader = new FileReader();
reader.onload = (e) => { reader.onload = (e) => {
const base64 = e.target.result; const base64 = e.target.result;
resolve(base64); resolve(base64);
that.itemList.deliveryPhoto[index]={ that.itemList.deliveryPhoto0[index]={
url:base64 url:base64
}; };
that.$forceUpdate(); that.$forceUpdate();
@ -1281,7 +1288,7 @@ export default {
return false return false
} }
if(!this.itemList.deliveryPhoto||this.itemList.deliveryPhoto.length<1){ if(!this.itemList.deliveryPhoto0&&this.itemList.deliveryPhoto0.length<1){
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "请上传配送单图片!", title: "请上传配送单图片!",
type: "warning", type: "warning",
@ -1292,9 +1299,10 @@ export default {
// //
this.itemList.files=[]; this.itemList.files=[];
this.itemList.deliveryPhoto.forEach(item=>{ this.itemList.deliveryPhoto0.forEach(item=>{
this.itemList.files.push(item.url); this.itemList.files.push(item.url);
}); });
this.itemList.deliveryPhoto=this.itemList.files
this.$forceUpdate(); this.$forceUpdate();
var data=[]; var data=[];

@ -68,10 +68,10 @@
<uni-icons @click="del(index)" type="closeempty" size="16" color="#ff0000"></uni-icons> <uni-icons @click="del(index)" type="closeempty" size="16" color="#ff0000"></uni-icons>
</view> </view>
</template> </template>
<u-upload ref="uUpload" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" :max-count="3" :width="100" :height="100" <!-- <u-upload ref="uUpload" :auto-upload="false" upload-text='' :max-size="10 * 1024 * 1024" :max-count="3" :width="100" :height="100"
:deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;" :deletable="true" :source-type="sourceType" style="background-color: #ecf5ff;"
@on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files"> @on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files">
</u-upload> </u-upload> -->
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
@ -392,7 +392,10 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
new Compressor(file, { new Compressor(file, {
quality: 0.3, // 0-1 quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024) convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => { success: (compressedFile) => {
// base64 // base64
const reader = new FileReader(); const reader = new FileReader();

@ -454,7 +454,10 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
new Compressor(file, { new Compressor(file, {
quality: 0.3, // 0-1 quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024) convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => { success: (compressedFile) => {
// base64 // base64
const reader = new FileReader(); const reader = new FileReader();

Loading…
Cancel
Save