Commit 16e70866 by liangjianmin

判断是否为海关编码为854232开头

parent 273593d6
Showing with 64 additions and 23 deletions
...@@ -64,34 +64,60 @@ ...@@ -64,34 +64,60 @@
</navigator> </navigator>
</view> </view>
<!-- 商检图片上传 --> <!-- 商检图片上传 -->
<view class="section" v-if="isInspOrg"> <view class="section" v-if="isInspOrg || isHG">
<view class="upload-box"> <view class="upload-box">
<view class="title row bothSide verCenter" v-if="goods_check_pic_list.length > 0"> <view class="title row bothSide verCenter">
<text class="tt-l">商检图片上传(仅商检必填)</text> <text class="tt-l">商检图片上传(仅商检必填)</text>
<text class="tt-r">{{ goods_check_pic_list.filter(subArray => subArray.length > 0).length }}/{{ goods_check_pic_list.length }}</text> <text class="tt-r">{{ goods_check_pic_list.filter(subArray => subArray.length > 0).length }}/{{ goods_check_pic_list.length || 0 }}</text>
</view> </view>
<view class="model-upload-list"> <view class="model-upload-list">
<view class="column" v-for="(item, index) in list" :key="index" :class="{ curr: goods_check_pic_list[index].length > 0 }"> <!-- 判断是否为海关编码为854232开头 -->
<view class="box row bothSide verCenter"> <template v-if="isHG">
<view class="file row verCenter"> <view class="column" v-for="(item, index) in list" :key="index">
<text class="t1">{{ item.model }}</text> <view class="box row bothSide verCenter">
<template v-if="goods_check_pic_list[index].length > 0"> <view class="file row verCenter">
<text class="t2" @click="previewChange(goods_check_pic_list[index], 0)">已上传&nbsp;{{ goods_check_pic_list[index].length }}</text> <text class="t1">{{ item.model }}</text>
<text class="clear" @click="clearFn(index)">清空</text> <template v-if="goods_check_pic_list[index].length > 0">
</template> <text class="t2" @click="previewChange(goods_check_pic_list[index], 0)">已上传&nbsp;{{ goods_check_pic_list[index].length }}</text>
<text class="clear" @click="clearFn(index)">清空</text>
</template>
</view>
<view class="file-btn row verCenter" @click="uploadBusinessChange(index)">
<template v-if="goods_check_pic_list[index].length > 0">
<text class="t1">继续上传</text>
</template>
<template v-else>
<text class="t1">上传图片</text>
</template>
<text class="iconfont icon-sanjiaoxing2"></text>
</view>
</view> </view>
<view class="file-btn row verCenter" @click="uploadBusinessChange(index)"> <navigator class="history-btn row verCenter" :url="'/pages/tallyGoods/historicalTally?erp_order_sn=' + form.erp_order_sn+'&model='+item.model + '&index='+ index + '&srcEntryID='+(encodeURIComponent(item.srcEntryID))+'&entryID='+(encodeURIComponent(item.entryID))">历史理货图片</navigator>
<template v-if="goods_check_pic_list[index].length > 0"> </view>
<text class="t1">继续上传</text> </template>
</template> <template v-else>
<template v-else> <view class="column" v-for="(item, index) in list" :key="index" :class="{ curr: goods_check_pic_list[index].length > 0 }">
<text class="t1">上传图片</text> <view class="box row bothSide verCenter">
</template> <view class="file row verCenter">
<text class="iconfont icon-sanjiaoxing2"></text> <text class="t1">{{ item.model }}</text>
<template v-if="goods_check_pic_list[index].length > 0">
<text class="t2" @click="previewChange(goods_check_pic_list[index], 0)">已上传&nbsp;{{ goods_check_pic_list[index].length }}</text>
<text class="clear" @click="clearFn(index)">清空</text>
</template>
</view>
<view class="file-btn row verCenter" @click="uploadBusinessChange(index)">
<template v-if="goods_check_pic_list[index].length > 0">
<text class="t1">继续上传</text>
</template>
<template v-else>
<text class="t1">上传图片</text>
</template>
<text class="iconfont icon-sanjiaoxing2"></text>
</view>
</view> </view>
<navigator class="history-btn row verCenter" :url="'/pages/tallyGoods/historicalTally?erp_order_sn=' + form.erp_order_sn+'&model='+item.model + '&index='+ index + '&srcEntryID='+(encodeURIComponent(item.srcEntryID))+'&entryID='+(encodeURIComponent(item.entryID))">历史理货图片</navigator>
</view> </view>
<navigator class="history-btn row verCenter" :url="'/pages/tallyGoods/historicalTally?erp_order_sn=' + form.erp_order_sn+'&model='+item.model + '&index='+ index + '&srcEntryID='+(encodeURIComponent(item.srcEntryID))+'&entryID='+(encodeURIComponent(item.entryID))">历史理货图片</navigator> </template>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -131,6 +157,7 @@ ...@@ -131,6 +157,7 @@
data() { data() {
return { return {
isInspOrg: false, //是否商检 isInspOrg: false, //是否商检
isHG: false,
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
customs_clearance_price_options: ['无', '有'], //清关费选项 customs_clearance_price_options: ['无', '有'], //清关费选项
currentIndex: -1, currentIndex: -1,
...@@ -268,10 +295,24 @@ ...@@ -268,10 +295,24 @@
this.disabled = false; this.disabled = false;
this.isInspOrg = Boolean(res.data.isInspOrg); //是否商检 this.isInspOrg = Boolean(res.data.isInspOrg); //是否商检
this.list = res.data.entrys.filter(function(entry) {
return entry.isEntryInspOrg === true; // 判断是否为海关编码为854232开头
this.isHG = res.data.entrys.some(function(entry) {
return entry.goodsNo && entry.goodsNo.toString().startsWith('854232');
}); });
if (this.isHG) {
this.list = res.data.entrys.filter(function(entry) {
return entry.isEntryInspOrg === false;
});
} else {
//是否商检
this.list = res.data.entrys.filter(function(entry) {
return entry.isEntryInspOrg === true;
});
}
this.goods_check_pic_list_id = this.list.map(function(entry) { this.goods_check_pic_list_id = this.list.map(function(entry) {
return entry.ptEntryID; return entry.ptEntryID;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment