Commit cc043633 authored by chenzj's avatar chenzj

新增查看图片功能

parent 4ea6b59b
...@@ -169,6 +169,14 @@ const install = (Vue, vm) => { ...@@ -169,6 +169,14 @@ const install = (Vue, vm) => {
detail: (params = {}) => vm.$u.get(config.adminPath+'/qc/information/list',params), detail: (params = {}) => vm.$u.get(config.adminPath+'/qc/information/list',params),
newlyAdd: (params = {}) => vm.$u.postJson(config.adminPath+'/qc/report',params), newlyAdd: (params = {}) => vm.$u.postJson(config.adminPath+'/qc/report',params),
}, },
//查看图片
viewpicture: {
//查看工单
viewWorkorder: (params = {}) => vm.$u.get(config.adminPath+'/mobile/pro/protask/getProWorkder',params),
//查看图片
viewSop: (params = {}) => vm.$u.get(config.adminPath+'/mes/md/sop/getProWorkder/' + params.workorderId),
},
// 增删改查例子 // 增删改查例子
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<u-button type="primary" @click="commonClick('MaterialRequest')">领料申请</u-button> <u-button type="primary" @click="commonClick('MaterialRequest')">领料申请</u-button>
<u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button> <u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button>
<u-button type="success" @click="commonClick('StockIn')">完工入库申请</u-button> <u-button type="success" @click="commonClick('StockIn')">完工入库申请</u-button>
<u-button type="primary" @click="commonClick('ViewPpicture')">查看图片</u-button>
</scroll-view> </scroll-view>
</view> </view>
...@@ -351,7 +352,7 @@ ...@@ -351,7 +352,7 @@
<u-modal title="退料申请数量" @confirm="materialReturnSetting()" show-cancel-button <u-modal title="退料申请数量" @confirm="materialReturnSetting()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" :title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialReturnFormVisible" width="700rpx"> v-model="materialReturn" width="700rpx">
<view class=""> <view class="">
<u-form label-width="100px"> <u-form label-width="100px">
<u-row> <u-row>
...@@ -379,6 +380,51 @@ ...@@ -379,6 +380,51 @@
:data="tableDataDetail"></zb-table> :data="tableDataDetail"></zb-table>
</view> </view>
</u-modal> </u-modal>
<u-modal title="生产工单" @confirm="materialReturnSave()" show-cancel-button :show-confirm-button="false" cancel-text="返回"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialReturn" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="100px" align="center">操作</uni-th>
<uni-th width="110px" align="center">工单编码</uni-th>
<uni-th width="110px" align="center">工单名称</uni-th>
<uni-th width="80px" align="center">来源类型</uni-th>
<uni-th width="80px" align="center">产品名称</uni-th>
<uni-th width="110px" align="center">编排单号</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in viewSopPicture" :key="index">
<uni-td align="center">
<view class="uni-group">
<!-- <button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料 -->
<!-- <button class="uni-button" size="mini" type="primary" @click="viewSopsShow()">查看 -->
<button class="uni-button" size="mini" type="primary" @click="viewSopsShow(line)">查看
</button>
</view>
</uni-td>
<uni-td align="center">{{ line.workorderId}}</uni-td>
<uni-td align="center">{{ line.workorderName }}</uni-td>
<uni-td align="center">{{ line.orderSource }}</uni-td>
<uni-td align="center">{{ line.productName }}</uni-td>
<uni-td align="center">{{ line.arrangeCode }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal title="显示图片" @confirm="materialReturnSave()" show-cancel-button :show-confirm-button="false" cancel-text="返回"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="material" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<view >
<image v-for="(line,index) in viewSop" class="u-avatar-demo" :src="line" mode="aspectFill"></image>
</view>
</scroll-view>
</view>
</u-modal>
</view> </view>
</template> </template>
...@@ -606,6 +652,8 @@ export default { ...@@ -606,6 +652,8 @@ export default {
tableSelectData: [], tableSelectData: [],
feedbackForms: [], feedbackForms: [],
ExceptionForms: {}, ExceptionForms: {},
viewSopPicture: [],
viewSop: [],
reasonList: [], reasonList: [],
materialUsageRecordList: [], materialUsageRecordList: [],
materialusagerecordLoading: false, materialusagerecordLoading: false,
...@@ -651,7 +699,9 @@ export default { ...@@ -651,7 +699,9 @@ export default {
recoilMaterialVisible:false, recoilMaterialVisible:false,
materialRequestVisible:false, materialRequestVisible:false,
materialReturnVisible:false, materialReturnVisible:false,
materialReturn:false,
stockInVisible:false, stockInVisible:false,
material:false,
feedingInspectionList: [], feedingInspectionList: [],
recoilMaterialList: [], recoilMaterialList: [],
materialRequestList: [], materialRequestList: [],
...@@ -783,6 +833,9 @@ export default { ...@@ -783,6 +833,9 @@ export default {
case 'abnormal': case 'abnormal':
this.doException() this.doException()
break; break;
case 'ViewPpicture':
this.viewiPctureShow()
break;
case 'FeedingInspection': case 'FeedingInspection':
this.feedingInspectionShow(); this.feedingInspectionShow();
break; break;
...@@ -1047,6 +1100,7 @@ export default { ...@@ -1047,6 +1100,7 @@ export default {
}) })
this.aopen = true; this.aopen = true;
}, },
async newlyAddss(){ async newlyAddss(){
const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms); const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms);
this.getTaskList(); this.getTaskList();
...@@ -1230,11 +1284,31 @@ export default { ...@@ -1230,11 +1284,31 @@ export default {
} }
}); });
}, },
viewiPctureShow(){
this.materialReturn=true;
// this.viewSopPicture = this.tableSelectData[0];
this.$u.api.viewpicture.viewWorkorder({"taskId":this.curTaskInfo.taskId}).then(res => {
if (res.code === 200) {
this.viewSopPicture = res.data;
}
});
},
materialReturnFormShow(line){ materialReturnFormShow(line){
this.materialReturnFormVisible=true; this.materialReturnFormVisible=true;
this.materialReturnFormData = {itemName: line.itemName}; this.materialReturnFormData = {itemName: line.itemName};
this.materialReturnSelected = line; this.materialReturnSelected = line;
}, },
viewSopsShow(row){
this.material=true;
// this.viewSopPicture = this.tableSelectData[0];
this.$u.api.viewpicture.viewSop({"workorderId":Number(row.workorderId)}).then(res => {
if (res.code === 200) {
console.log(res.data)
this.viewSop = res.data;
}
});
},
materialReturnSetting(){ materialReturnSetting(){
this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum; this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum;
this.materialReturnFormVisible=false; this.materialReturnFormVisible=false;
......
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 to comment