zouyanyan 1 month ago
commit 7170a4ddbb

@ -217,7 +217,15 @@
<view class="list-container" v-if="pallet&&pallet.instdetailList">
<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>
</view>
@ -433,9 +441,9 @@
immediate: true, //
},
methods: {
gotocxDetail(instno,project){
gotocxDetail(instno,project,type){
uni.navigateTo({
url: `/pages/pallet/tpcxtk?instno=${instno}&project=${project}`
url: `/pages/pallet/tpcxtk?instno=${instno}&project=${project}&type={type}`
});
},
_initDetail(palletAll = this.palletAll) {

@ -58,10 +58,10 @@
</view>
</view>
</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;"
@on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files">
</u-upload>
</u-upload>-->
</uni-collapse-item>
</u-checkbox-group>
</uni-collapse>
@ -386,7 +386,10 @@ export default {
// console.log(Compressor)
const Compressor1 = new Compressor(file, {
quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => {
// console.log("compressedFile",compressedFile)
// base64

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

@ -68,10 +68,10 @@
<uni-icons @click="del(index)" type="closeempty" size="16" color="#ff0000"></uni-icons>
</view>
</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;"
@on-remove="onRemove($event,index)" @on-choose-complete="onChooseComplete($event,index)" :file-list="pallet.files">
</u-upload>
</u-upload> -->
</uni-collapse-item>
</uni-collapse>
@ -392,7 +392,10 @@ export default {
return new Promise((resolve, reject) => {
new Compressor(file, {
quality: 0.3, // 0-1
<<<<<<< HEAD
convertSize: 1048576, // 1M(1024*1024)
=======
>>>>>>> e53878004c989de2e23cc181dc0c247667489fee
success: (compressedFile) => {
// base64
const reader = new FileReader();

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

Loading…
Cancel
Save