Commit 8f4a1d6e authored by 沈翠玲's avatar 沈翠玲

查看图纸

parent 5f9f5560
...@@ -423,15 +423,15 @@ const install = (Vue, vm) => { ...@@ -423,15 +423,15 @@ const install = (Vue, vm) => {
newlyAdd: (params = {}) => newlyAdd: (params = {}) =>
vm.$u.postJson(config.adminPath + '/qc/report', params), vm.$u.postJson(config.adminPath + '/qc/report', params),
}, },
//查看图 //查看图
viewpicture: { viewpicture: {
//查看工单 //查看工单
viewWorkorder: (params = {}) => listLinkFile: (params = {}) =>
vm.$u.get( vm.$u.get(
config.adminPath + '/mobile/pro/protask/getProWorkder', config.adminPath + '/mobile/pro/protask/listLinkFile',
params params
), ),
//查看图 //查看图
viewSop: (params = {}) => viewSop: (params = {}) =>
vm.$u.get( vm.$u.get(
config.adminPath + '/mes/md/sop/getProWorkder/' + params.workorderId config.adminPath + '/mes/md/sop/getProWorkder/' + params.workorderId
......
...@@ -8,7 +8,7 @@ import th from "./th_TH.json"; ...@@ -8,7 +8,7 @@ import th from "./th_TH.json";
Vue.use(VueI18n); Vue.use(VueI18n);
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: localStorage.getItem('language') || 'zh', // 默认语言为中文 locale: uni.getStorageSync('lang') || 'zh', // 默认语言为中文
messages: { messages: {
th, th,
zh, zh,
...@@ -19,7 +19,7 @@ const i18n = new VueI18n({ ...@@ -19,7 +19,7 @@ const i18n = new VueI18n({
}); });
export const setLocal = (lang) => { export const setLocal = (lang) => {
localStorage.setItem('lang', lang) uni.setStorageSync('lang', lang)
i18n.locale = lang i18n.locale = lang
} }
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"生产报工": "การรายงานการผลิต", "生产报工": "การรายงานการผลิต",
"修改报工": "แก้ไขการรายงาน", "修改报工": "แก้ไขการรายงาน",
"完成作业": "เสร็จสิ้นการทำงาน", "完成作业": "เสร็จสิ้นการทำงาน",
"查看图片": "ดูภาพ", "查看图纸": "ดูรูปวาด",
"异常报告": "รายงานข้อบกพร่อง", "异常报告": "รายงานข้อบกพร่อง",
"工序外协收货&报工": "การรับของและการรายงานการผลิตภายนอก", "工序外协收货&报工": "การรับของและการรายงานการผลิตภายนอก",
"生产工单:": "หมายเลขคำสั่งผลิต:", "生产工单:": "หมายเลขคำสั่งผลิต:",
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
"报工时间:": "เวลาการรายงาน:", "报工时间:": "เวลาการรายงาน:",
"报工人:": "ผู้รายงาน:", "报工人:": "ผู้รายงาน:",
"报工人员": "บุคลากรที่รายงาน", "报工人员": "บุคลากรที่รายงาน",
"是否关单:": "是否要ปิดงาน:", "是否关单:": "ไม่ว่าจะเป็นรายการปิด:",
"是": "ใช่", "是": "ใช่",
"否": "ไม่ใช่", "否": "ไม่ใช่",
"选择人员": "เลือกบุคลากร", "选择人员": "เลือกบุคลากร",
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
"生产工单": "หมายเลขคำสั่งผลิต", "生产工单": "หมายเลขคำสั่งผลิต",
"工单编码": "รหัสคำสั่งผลิต", "工单编码": "รหัสคำสั่งผลิต",
"工单名称": "ชื่อคำสั่งผลิต", "工单名称": "ชื่อคำสั่งผลิต",
"来源类型": "ประเภทแหล่งที่มา", "图纸类型": "ประเภทภาพวาด",
"产品名称": "ชื่อผลิตภัณฑ์", "产品名称": "ชื่อผลิตภัณฑ์",
"查看": "ดู", "查看": "ดู",
"详情": "รายละเอียด", "详情": "รายละเอียด",
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
"已上机": "ได้ขึ้นเครื่องแล้ว", "已上机": "ได้ขึ้นเครื่องแล้ว",
"已上机,重复扫码": "ได้ขึ้นเครื่องแล้ว สแกนซ้ำ", "已上机,重复扫码": "ได้ขึ้นเครื่องแล้ว สแกนซ้ำ",
"系统提示": "ข้อความระบบ", "系统提示": "ข้อความระบบ",
"是否新增刀模版和产品工序的关联?": "是否要เพิ่มความสัมพันธ์ระหว่างแม่แบบและกระบวนการผลิต?", "是否新增刀模版和产品工序的关联?": "ไม่ว่าจะเป็นการเพิ่มความสัมพันธ์ระหว่างลายฉลุมีดและกระบวนการผลิต?",
"刀模版SN不一致": "หมายเลขแม่แบบไม่สอดคล้อง", "刀模版SN不一致": "หมายเลขแม่แบบไม่สอดคล้อง",
"下机成功": "ลงเครื่องสำเร็จ", "下机成功": "ลงเครื่องสำเร็จ",
"打印": "พิมพ์", "打印": "พิมพ์",
...@@ -213,8 +213,8 @@ ...@@ -213,8 +213,8 @@
"单位:": "หน่วย:", "单位:": "หน่วย:",
"采购单位:": "หน่วยการจัดซื้อ:", "采购单位:": "หน่วยการจัดซื้อ:",
"换算值:": "ค่าการเปลี่ยนแปลง:", "换算值:": "ค่าการเปลี่ยนแปลง:",
"单层厚(丝):": "ความหนาแบบชั้นเดียว(丝):", "单层厚(丝):": "ความหนาชั้นเดียว (ผ้าไหม):",
"单重(KG):": "น้ำหนักแบบชั้นเดียว(KG):", "单重(KG):": "น้ำหนักเดี่ยว (กก.):",
"层数:": "จำนวนชั้น:", "层数:": "จำนวนชั้น:",
"长度cm:": "ความยาวซม.:", "长度cm:": "ความยาวซม.:",
"高度cm:": "ความสูงซม.:", "高度cm:": "ความสูงซม.:",
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
"印刷正面颜色:": "สีด้านหน้าการพิมพ์:", "印刷正面颜色:": "สีด้านหน้าการพิมพ์:",
"印刷背面颜色:": "สีด้านหลังการพิมพ์:", "印刷背面颜色:": "สีด้านหลังการพิมพ์:",
"仓库:": "คลังสินค้า:", "仓库:": "คลังสินค้า:",
"是否唯一码产品:": "是否ผลิตภัณฑ์หมายเลขเดี่ยว:", "是否唯一码产品:": "ไม่ว่าจะเป็นผลิตภัณฑ์รหัสเฉพาะ:",
"不考虑型体配色:": "ไม่พิจารณาสีของรูปแบบ:", "不考虑型体配色:": "ไม่พิจารณาสีของรูปแบบ:",
"实物样/参考样:": "ตัวอย่างจริง/ตัวอย่างอ้างอิง:", "实物样/参考样:": "ตัวอย่างจริง/ตัวอย่างอ้างอิง:",
"配方:": "สูตร:", "配方:": "สูตร:",
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
"行双刀位:": "ตำแหน่งมีดคู่แถว:", "行双刀位:": "ตำแหน่งมีดคู่แถว:",
"排版行数:": "จำนวนแถวในการจัดหน้า:", "排版行数:": "จำนวนแถวในการจัดหน้า:",
"角型:": "ประเภทมุม:", "角型:": "ประเภทมุม:",
"角度(mm):": "มุม(mm):", "角度(mm):": "มุม (มม.):",
"吹膜宽度:": "ความกว้างของการเป่า:", "吹膜宽度:": "ความกว้างของการเป่า:",
"吹膜厚度:": "ความหนาของการเป่า:", "吹膜厚度:": "ความหนาของการเป่า:",
"印刷宽度:": "ความกว้างของการพิมพ์:", "印刷宽度:": "ความกว้างของการพิมพ์:",
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
"补打": "พิมพ์ซ้ำ", "补打": "พิมพ์ซ้ำ",
"报工类型": "ประเภทการรายงานการผลิต", "报工类型": "ประเภทการรายงานการผลิต",
"外协单号": "หมายเลขการผลิตภายนอก", "外协单号": "หมายเลขการผลิตภายนอก",
"是否关单": "是否要ปิดงาน", "是否关单": "ไม่ว่าจะเป็นรายการปิด",
"生产任务": "งานผลิต", "生产任务": "งานผลิต",
"报工数量": "จำนวนรายงานการผลิต", "报工数量": "จำนวนรายงานการผลิต",
"良品报工": "การรายงานสินค้าที่ผ่านการตรวจสอบ", "良品报工": "การรายงานสินค้าที่ผ่านการตรวจสอบ",
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
"报工时间": "เวลารายงานการผลิต", "报工时间": "เวลารายงานการผลิต",
"审核人": "ผู้ตรวจสอบ", "审核人": "ผู้ตรวจสอบ",
"生产工单编号": "หมายเลขคำสั่งผลิต", "生产工单编号": "หมายเลขคำสั่งผลิต",
"是否确认删除生产报工记录编号为\"": "是否要ยืนยันการลบบันทึกรายงานการผลิตหมายเลข\"", "是否确认删除生产报工记录编号为\"": "ไม่ว่าจะเป็นการยืนยันการลบหมายเลขบันทึกการผลิตหนังสือพิมพ์เป็น\"",
"\"的数据项?": "\"ข้อข้อมูล?", "\"的数据项?": "\"ข้อข้อมูล?",
"删除成功": "ลบสำเร็จ", "删除成功": "ลบสำเร็จ",
"删除失败": "ลบไม่สำเร็จ", "删除失败": "ลบไม่สำเร็จ",
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
"查看生产报工单信息": "ดูข้อมูลเอกสารรายงานการผลิต", "查看生产报工单信息": "ดูข้อมูลเอกสารรายงานการผลิต",
"修改成功": "แก้ไขสำเร็จ", "修改成功": "แก้ไขสำเร็จ",
"修改失败": "แก้ไขไม่สำเร็จ", "修改失败": "แก้ไขไม่สำเร็จ",
"MES作业端": "端 MES", "MES作业端": "MES สิ้นสุดการทำงาน",
"账号": "บัญชี", "账号": "บัญชี",
"密码": "รหัสผ่าน", "密码": "รหัสผ่าน",
"登 录": "เข้าสู่ระบบ", "登 录": "เข้าสู่ระบบ",
...@@ -288,5 +288,7 @@ ...@@ -288,5 +288,7 @@
"暂不升级": "ไม่อัปเกรดในขณะนี้", "暂不升级": "ไม่อัปเกรดในขณะนี้",
"立即升级": "อัปเกรดทันที", "立即升级": "อัปเกรดทันที",
"暂无数据~~": "ไม่มีข้อมูลในขณะนี้ ~", "暂无数据~~": "ไม่มีข้อมูลในขณะนี้ ~",
"合计": "รวม" "合计": "รวม",
"图纸名": "ชื่อภาพวาด",
"不支持查看其它格式的文件": "ไม่สนับสนุนการดูไฟล์ในรูปแบบอื่น ๆ"
} }
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"生产报工": "生产报工", "生产报工": "生产报工",
"修改报工": "修改报工", "修改报工": "修改报工",
"完成作业": "完成作业", "完成作业": "完成作业",
"查看图片": "查看图片", "查看图纸": "查看图纸",
"异常报告": "异常报告", "异常报告": "异常报告",
"工序外协收货&报工": "工序外协收货&报工", "工序外协收货&报工": "工序外协收货&报工",
"生产工单:": "生产工单:", "生产工单:": "生产工单:",
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
"生产工单": "生产工单", "生产工单": "生产工单",
"工单编码": "工单编码", "工单编码": "工单编码",
"工单名称": "工单名称", "工单名称": "工单名称",
"来源类型": "来源类型", "图纸类型": "图纸类型",
"产品名称": "产品名称", "产品名称": "产品名称",
"查看": "查看", "查看": "查看",
"详情": "详情", "详情": "详情",
...@@ -288,5 +288,7 @@ ...@@ -288,5 +288,7 @@
"暂不升级": "暂不升级", "暂不升级": "暂不升级",
"立即升级": "立即升级", "立即升级": "立即升级",
"暂无数据~~": "暂无数据~~", "暂无数据~~": "暂无数据~~",
"合计": "合计" "合计": "合计",
"图纸名": "图纸名",
"不支持查看其它格式的文件": "不支持查看其它格式的文件"
} }
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<u-button type="success" @click="commonClick('Prod')">{{isWaiXie ? $t('外协收货') : $t('生产报工')}}</u-button> <u-button type="success" @click="commonClick('Prod')">{{isWaiXie ? $t('外协收货') : $t('生产报工')}}</u-button>
<u-button type="success" @click="commonClick('editProd')" v-if="!isWaiXie">{{$t('修改报工')}}</u-button> <u-button type="success" @click="commonClick('editProd')" v-if="!isWaiXie">{{$t('修改报工')}}</u-button>
<u-button type="primary" @click="commonClick('FinshTask')">{{$t('完成作业')}}</u-button> <u-button type="primary" @click="commonClick('FinshTask')">{{$t('完成作业')}}</u-button>
<u-button type="primary" @click="commonClick('ViewPpicture')" v-if="!isWaiXie">{{$t('查看图')}}</u-button> <u-button type="primary" @click="commonClick('ViewPpicture')" v-if="!isWaiXie">{{$t('查看图')}}</u-button>
<u-button type="warning" @click="commonClick('abnormal')" v-if="!isWaiXie">{{$t('异常报告')}}</u-button> <u-button type="warning" @click="commonClick('abnormal')" v-if="!isWaiXie">{{$t('异常报告')}}</u-button>
<!-- <u-button type="primary" @click="commonClick('StockIn')">完工入库申请</u-button> --> <!-- <u-button type="primary" @click="commonClick('StockIn')">完工入库申请</u-button> -->
</scroll-view> </scroll-view>
...@@ -320,19 +320,13 @@ ...@@ -320,19 +320,13 @@
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" :emptyText="$t('未查询到数据')"> <uni-table ref="qcTable" border stripe :loading="loading" :emptyText="$t('未查询到数据')">
<uni-tr> <uni-tr>
<uni-th width="110px" align="center">{{$t('工单编码')}}</uni-th> <uni-th width="80px" align="center">{{$t('图纸名')}}</uni-th>
<uni-th width="110px" align="center">{{$t('工单名称')}}</uni-th> <uni-th width="80px" align="center">{{$t('图纸类型')}}</uni-th>
<uni-th width="80px" align="center">{{$t('来源类型')}}</uni-th>
<uni-th width="80px" align="center">{{$t('产品名称')}}</uni-th>
<uni-th width="110px" align="center">{{$t('编排单号')}}</uni-th>
<uni-th width="100px" align="center">{{$t('操作')}}</uni-th> <uni-th width="100px" align="center">{{$t('操作')}}</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line, index) in viewSopPicture" :key="index"> <uni-tr v-for="(line, index) in viewSopPicture" :key="index">
<uni-td align="center">{{ line.workorderCode }}</uni-td> <uni-td align="center">{{ line.fileName }}</uni-td>
<uni-td align="center">{{ line.workorderName }}</uni-td> <uni-td align="center">{{ line.fileType }}</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-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="viewSopsShow(line)">{{$t('查看')}}</button> <button class="uni-button" size="mini" type="primary" @click="viewSopsShow(line)">{{$t('查看')}}</button>
...@@ -373,6 +367,7 @@ ...@@ -373,6 +367,7 @@
<script> <script>
import i18n from '../../../lang/index' import i18n from '../../../lang/index'
import config from '@/common/config.js'
import SearchInput from '@/components/ScanInput/index.vue'; import SearchInput from '@/components/ScanInput/index.vue';
import User from '@/components/User/User.vue'; import User from '@/components/User/User.vue';
...@@ -2693,7 +2688,7 @@ export default { ...@@ -2693,7 +2688,7 @@ export default {
// this.viewSopPicture = this.tableSelectData[0]; // this.viewSopPicture = this.tableSelectData[0];
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0]; this.curTaskInfo = this.tableSelectData[0];
this.$u.api.viewpicture.viewWorkorder({ taskId: this.curTaskInfo.taskId }).then((res) => { this.$u.api.viewpicture.listLinkFile({ taskId: this.curTaskInfo.taskId, workunitId: this.vuex_workunit.workunitId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.viewSopPicture = res.data; this.viewSopPicture = res.data;
} }
...@@ -2734,13 +2729,47 @@ export default { ...@@ -2734,13 +2729,47 @@ export default {
}, },
viewSopsShow(row) { viewSopsShow(row) {
// this.viewSopPicture = this.tableSelectData[0]; // this.viewSopPicture = this.tableSelectData[0];
this.$u.api.viewpicture.viewSpecificationSheetInfo({ workorderId: Number(row.workorderId) }).then((res) => { uni.showLoading({
if (res.code === 200) { });
console.log(res.data); if(['png', 'jpeg', 'jpg'].indexOf(row.fileName.substring(row.fileName.lastIndexOf('.') + 1)) > -1) {
this.ProogingSpecificationSheetForm = res.data; uni.downloadFile({
} url: config.baseUrl + row.filePath,
}); header: {
this.material = true; Authorization: this.vuex_token
},
success: function (res) {
uni.hideLoading({
});
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
}
});
}
});
} else if(['pdf'].indexOf(row.fileName.substring(row.fileName.lastIndexOf('.') + 1)) > -1) {
uni.downloadFile({
url: config.baseUrl + row.filePath,
header: {
Authorization: this.vuex_token
},
success: function (res) {
var filePath = res.tempFilePath;
uni.hideLoading({
});
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function (res) {
}
});
}
});
} else {
t.$u.toast(i18n.t('不支持查看其它格式的文件'));
}
}, },
materialReturnSetting() { materialReturnSetting() {
this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum; this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum;
......
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