This commit is contained in:
shilixia 2022-03-01 09:31:39 +08:00
parent 164c1c5847
commit c25bc213af
11 changed files with 144 additions and 61 deletions

View File

@ -65,13 +65,13 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" width="120"> <el-table-column label="状态" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.state===0" type="success"> <el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }} {{ state_[scope.row.state] }}
</el-tag> </el-tag>
<el-tag v-else-if="scope.row.state===1" type="warning"> <el-tag v-else-if="scope.row.state===20" type="warning">
{{ state_[scope.row.state] }} {{ state_[scope.row.state] }}
</el-tag> </el-tag>
<el-tag v-else-if="scope.row.state===2" > <el-tag v-else-if="scope.row.state===30" >
{{ state_[scope.row.state] }} {{ state_[scope.row.state] }}
</el-tag> </el-tag>
<el-tag v-else type="danger"> <el-tag v-else type="danger">

View File

@ -84,7 +84,16 @@
<template slot-scope="scope">{{ usetype_[scope.row.way] }}</template> <template slot-scope="scope">{{ usetype_[scope.row.way] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="校/检状态" width="100"> <el-table-column label="校/检状态" width="100">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template> <template slot-scope="scope">
<el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</template>
</el-table-column> </el-table-column>
<el-table-column label="保管人"> <el-table-column label="保管人">

View File

@ -52,7 +52,16 @@
<template slot-scope="scope">{{ scope.row.equipment_.model }}</template> <template slot-scope="scope">{{ scope.row.equipment_.model }}</template>
</el-table-column> </el-table-column>
<el-table-column label="设备状态"> <el-table-column label="设备状态">
<template slot-scope="scope">{{ state_[scope.row.equipment_.state] }}</template> <template slot-scope="scope">
<el-tag v-if="scope.row.equipment_.state===10" type="success">
{{ state_[scope.row.equipment_.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.equipment_.state] }}
</el-tag>
</template>
</el-table-column> </el-table-column>
<el-table-column label="校准检查日期"> <el-table-column label="校准检查日期">
<template slot-scope="scope">{{ scope.row.check_date }}</template> <template slot-scope="scope">{{ scope.row.check_date }}</template>

View File

@ -141,7 +141,7 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="90%" width="90%"
:title="dialogType === 'edit' ? '编辑出/如库记录' : '新增出/如库记录'" :title="dialogType === 'edit' ? '编辑入库记录' : '新增入库记录'"
> >
<el-form <el-form
ref="Form" ref="Form"
@ -220,6 +220,24 @@
<el-input v-model="item.batch" placeholder="批次号"></el-input> <el-input v-model="item.batch" placeholder="批次号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5" style="margin-right: 10px">
<el-form-item
class="expiration_date"
label="有效期"
:prop="'details.' + index + '.expiration_date'"
>
<el-date-picker
v-model="item.expiration_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:100%"
>
</el-date-picker>
</el-form-item>
</el-col>
<!-- 删除按钮 --> <!-- 删除按钮 -->
<el-col :span="1"> <el-col :span="1">
<el-tooltip <el-tooltip

View File

@ -1,7 +1,11 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-button v-if="this.$route.params.pu_order!=null" type="primary" icon="el-icon-plus" @click="handlecgxCreate" <el-button
v-if="this.$route.params.pu_order != null"
type="primary"
icon="el-icon-plus"
@click="handlecgxCreate"
>新增采购项入库</el-button >新增采购项入库</el-button
> >
<el-table <el-table
@ -39,20 +43,29 @@
<el-table-column label="出入库数量"> <el-table-column label="出入库数量">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
<el-table-column label="是否需要复验" v-if="this.$route.params.pu_order!=null"> <el-table-column
label="是否需要复验"
v-if="this.$route.params.pu_order != null"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.need_test == false"></el-tag> <el-tag v-if="scope.row.need_test == false"></el-tag>
<el-tag v-else></el-tag> <el-tag v-else></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="复验是否合格" v-if="this.$route.params.pu_order!=null"> <el-table-column
label="复验是否合格"
v-if="this.$route.params.pu_order != null"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_testok == false">不合格</el-tag> <el-tag v-if="scope.row.is_testok == false">不合格</el-tag>
<el-tag v-else>合格</el-tag> <el-tag v-else>合格</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文件" v-if="this.$route.params.pu_order!=null"> <el-table-column
label="文件"
v-if="this.$route.params.pu_order != null"
>
<template slot-scope="scope" v-if="scope.row.files"> <template slot-scope="scope" v-if="scope.row.files">
<div v-for="item in scope.row.files_" v-bind:key="item.id"> <div v-for="item in scope.row.files_" v-bind:key="item.id">
<el-link :href="item.path" target="_blank" type="primary">{{ <el-link :href="item.path" target="_blank" type="primary">{{
@ -61,7 +74,12 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="220px" v-if="this.$route.params.pu_order!=null"> <el-table-column
align="center"
label="操作"
width="220px"
v-if="this.$route.params.pu_order != null"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
type="primary" type="primary"
@ -116,8 +134,8 @@
</el-input> </el-input>
</el-form-item></div </el-form-item></div
></el-col> ></el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12" <el-col :span="12"
><div class="grid-content bg-purple"> ><div class="grid-content bg-purple">
<el-form-item label="到货时间"> <el-form-item label="到货时间">
@ -154,6 +172,16 @@
<el-form-item label="批次" :prop="batch"> <el-form-item label="批次" :prop="batch">
<el-input v-model="inpur.batch" placeholder="批次号"></el-input> <el-input v-model="inpur.batch" placeholder="批次号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="有效期" :prop="expiration_date">
<el-date-picker
v-model="inpur.expiration_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width: 100%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="入库数量" :prop="count"> <el-form-item label="入库数量" :prop="count">
<el-input-number v-model="inpur.count" :min="0"></el-input-number> <el-input-number v-model="inpur.count" :min="0"></el-input-number>
</el-form-item> </el-form-item>

View File

@ -47,6 +47,9 @@
<el-table-column label="规格型号"> <el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template> <template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column> </el-table-column>
<el-table-column label="有效期">
<template slot-scope="scope">{{ scope.row.expiration_date }}</template>
</el-table-column>
<el-table-column label="物料编号"> <el-table-column label="物料编号">
<template slot-scope="scope">{{ <template slot-scope="scope">{{

View File

@ -578,7 +578,7 @@
:headers="upHeaders" :headers="upHeaders"
:file-list="fileList" :file-list="fileList"
:limit="1" :limit="1"
accept=".doc,.docx,.pdf,.jpg,.png,.tif,.gif,.apng" accept=".pdf,.jpg,.png,.tif,.gif,.apng"
> >
<el-button size="small" type="primary">上传文件</el-button> <el-button size="small" type="primary">上传文件</el-button>
</el-upload> </el-upload>

View File

@ -9,8 +9,9 @@
border border
fit fit
stripe stripe
highlight-current-row height="100"
max-height="700" highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="半成品名称"> <el-table-column label="半成品名称">
@ -96,8 +97,10 @@
border border
fit fit
stripe stripe
highlight-current-row
max-height="600" height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="半成品名称"> <el-table-column label="半成品名称">
@ -157,8 +160,9 @@
border border
fit fit
stripe stripe
highlight-current-row height="100"
max-height="600" highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column <el-table-column
@ -220,8 +224,9 @@
border border
fit fit
stripe stripe
highlight-current-row height="100"
max-height="600" highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="半成品名称"> <el-table-column label="半成品名称">
@ -270,11 +275,11 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="wproductList1.count > 0" v-show="wproductList4.count > 0"
:total="wproductList1.count" :total="wproductList4.count"
:page.sync="listQuery1.page" :page.sync="listQuery4.page"
:limit.sync="listQuery1.page_size" :limit.sync="listQuery4.page_size"
@pagination="getList1" @pagination="getList4"
/> />
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
@ -286,8 +291,9 @@
border border
fit fit
stripe stripe
highlight-current-row height="100"
max-height="600" highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
@ -850,7 +856,7 @@
console.log(this.formbcp); console.log(this.formbcp);
scrap(this.bcpbf, this.formbcp).then((response) => { scrap(this.bcpbf, this.formbcp).then((response) => {
if (response.data) { if (response.code >= 200) {
this.$message.success("该半成品已报废!"); this.$message.success("该半成品已报废!");
this.dialogFormVisiblebcp = false; this.dialogFormVisiblebcp = false;
this.getList(); this.getList();

View File

@ -18,7 +18,7 @@
style="width: 100%" style="width: 100%"
height="100" height="100"
highlight-current-row highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 30}" v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />

View File

@ -98,22 +98,26 @@
stripe stripe
highlight-current-row highlight-current-row
height="230" height="230"
style="width: 100%" style="width: 100%"
> >
<el-table-column type="index" width="50" />
<el-table-column <el-table-column
prop="subproduction_plan_.number" prop="subproduction_plan_.number"
label="子计划编号" label="子计划编号"
width="100"
> >
</el-table-column> </el-table-column>
<el-table-column prop="number" label="玻璃编号"> <el-table-column prop="number" label="玻璃编号" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="material_.name" label="玻璃状态"> <el-table-column
prop="material_.name"
label="玻璃状态"
width="170"
>
</el-table-column> </el-table-column>
<el-table-column prop="place" label="摆放位置"> <el-table-column prop="place" label="摆放位置"> </el-table-column>
</el-table-column> <el-table-column align="center" label="操作" width="100px" fixed="right">
<el-table-column align="center" label="操作" width="100px"> <template slot-scope="scope" >
<template slot-scope="scope">
<el-link type="primary" @click="handleupdatewproduct(scope)" <el-link type="primary" @click="handleupdatewproduct(scope)"
>编辑</el-link >编辑</el-link
> >
@ -812,35 +816,41 @@ export default {
handleClick(tab) { handleClick(tab) {
console.log(tab.name); console.log(tab.name);
var str = tab.label.substr(tab.label.length - 1, 1); var str = tab.label.substr(tab.label.length - 1, 1);
if (str == "x") { // if (str == "x") {
const xhr = new XMLHttpRequest(); // const xhr = new XMLHttpRequest();
xhr.open("get", tab.name, true); // xhr.open("get", tab.name, true);
xhr.responseType = "arraybuffer"; // xhr.responseType = "arraybuffer";
xhr.onload = () => { // xhr.onload = () => {
if (xhr.status == 200) { // if (xhr.status == 200) {
mammoth // mammoth
.convertToHtml({ arrayBuffer: new Uint8Array(xhr.response) }) // .convertToHtml({ arrayBuffer: new Uint8Array(xhr.response) })
.then((resultObject) => { // .then((resultObject) => {
this.$nextTick(() => { // this.$nextTick(() => {
this.wordText = resultObject.value; // this.wordText = resultObject.value;
}); // });
}); // });
} // };
}; // xhr.send();
xhr.send(); // var filediv = document.getElementById("file");
var filediv = document.getElementById("file"); // filediv.innerHTML =
filediv.innerHTML = // ' <div id="wordView" v-html=' + this.wordText + " />";
' <div id="wordView" v-html=' + this.wordText + " />"; // }
} else if (str == "f") { if (str == "f") {
this.pdf = tab.name; this.pdf = tab.name;
var filediv = document.getElementById("file"); var filediv = document.getElementById("file");
filediv.innerHTML = filediv.innerHTML =
" <iframe width=1000 height=900 frameborder=0 scrolling=auto src=" + " <iframe width=1000 height=900 frameborder=0 scrolling=auto src=" +
tab.name + tab.name +
"></iframe>"; "></iframe>";
} else if (str == "g") {
var filediv = document.getElementById("file");
filediv.innerHTML =
" <img width=1000 height=900 frameborder=0 scrolling=auto src=" +
tab.name +
"></img>";
} }
}, },
getWordText() { getWordText() {
@ -889,10 +899,9 @@ export default {
//半成品摆放的位置 //半成品摆放的位置
handleupdatewproduct(scope) { handleupdatewproduct(scope) {
this.dialogwproductplace = true; this.dialogwproductplace = true;
this.wproductplaceID=scope.row.id; this.wproductplaceID = scope.row.id;
}, },
submitwproductplace() { submitwproductplace() {
wproductPlace(this.wproductplaceID, this.wproductplace).then((res) => { wproductPlace(this.wproductplaceID, this.wproductplace).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getpwpList(); this.getpwpList();

View File

@ -421,6 +421,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="scope.row.material_.type == 2" v-if="scope.row.material_.type == 2"
type="primary"
@click="handlewproduct(scope)" @click="handlewproduct(scope)"
> >
选择半成品 选择半成品