Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2022-01-26 16:42:25 +08:00
commit b88ad25749
14 changed files with 526 additions and 304 deletions

View File

@ -368,3 +368,12 @@ export function toorder(data) {
data
})
}
//申请
export function needtoorder(data) {
return request({
url: '/wpm/wproduct/need_to_order/',
method: 'post',
data
})
}

View File

@ -263,10 +263,10 @@ export const asyncRoutes = [
meta: { title: '生产设备', icon: 'example', perms: ['em_equipment'] }
},
{
path: 'detection ',
name: 'detection ',
component: () => import('@/views/em/detection'),
meta: { title: '监视和测量设备', icon: 'example', perms: ['em_detection'] }
path: 'monitoring ',
name: 'monitoring ',
component: () => import('@/views/em/monitoring'),
meta: { title: '监视和测量设备', icon: 'example', perms: ['em_monitoring'] }
},
{
path: 'record',

View File

@ -7,7 +7,7 @@
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
placeholder="检测设备名称/检测设备编号/备注"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
@ -40,7 +40,7 @@
v-el-height-adaptive-table="{ bottomOffset: 42 }"
>
<el-table-column type="index" width="50" />
<el-table-column label="设备编号">
<el-table-column label="设备编号" width="100">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -63,14 +63,17 @@
</el-table-column>
<el-table-column label="下次校准日期" width="130">
<template slot-scope="scope">
{{ scope.row.next_check_date }}</template
<el-tag v-if="scope.row.next_check_date" :type="setClass(scope.row.next_check_date)">
{{scope.row.next_check_date}}
</el-tag>
<div v-else></div></template
>
</el-table-column>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="型号规格">
<el-table-column label="型号规格" width="100">
<template slot-scope="scope">{{ scope.row.model }}</template>
</el-table-column>
@ -89,7 +92,7 @@
scope.row.keeper_.username
}}</template>
</el-table-column>
<el-table-column label="存放位置">
<el-table-column label="存放位置" width="100">
<template slot-scope="scope">{{ scope.row.place }}</template>
</el-table-column>
<el-table-column label="绑定工序">
@ -199,9 +202,9 @@
>
<el-option
v-for="item in mgmoptions"
:key="item.value"
:key="item.id"
:label="item.label"
:value="item.value"
:value="item.id"
>
</el-option>
</el-select>
@ -226,9 +229,9 @@
>
<el-option
v-for="item in keeperOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
@ -307,8 +310,7 @@
</el-dialog>
</div>
</template>
<style>
</style>
<script>
import {
getpEquipmentList,
@ -317,10 +319,8 @@ import {
deleteEquipment,
} from "@/api/equipment";
import { getUserList } from "@/api/user";
import { getOrgList } from "@/api/org";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
name: "",
@ -411,7 +411,7 @@ export default {
type: [{ required: true, message: "请输入", trigger: "blur" }],
model: [{ required: true, message: "请输入", trigger: "blur" }],
state: [{ required: true, message: "请选择", trigger: "blur" }],
belong_dept: [{ required: true, message: "请选择", trigger: "blur" }],
},
datatime: null,
};
@ -422,7 +422,7 @@ export default {
this.getList();
this.getUserList();
this.getOrgList();
},
methods: {
checkPermission,
@ -440,48 +440,28 @@ export default {
},
//校准时间提醒
tableRowClassName(row, column, rowIndex, columnIndex) {
if(row.row.next_check_date!=null)
{
var adata = new Date(); //获取当前时间
const date = {
year: adata.getFullYear(),
month: adata.getMonth() + 1,
date: adata.getDate(),
};
const newmonth = date.month > 10 ? date.month : "0" + date.month;
const day = date.date > 10 ? date.date : "0" + date.date;
var updateTime = date.year + "-" + newmonth + "-" + day;
var dateBegin = row.row.next_check_date;
var a =
(new Date(dateBegin).getTime() - new Date(updateTime).getTime()) /1000/60/60/24; //计算出相差的毫秒数
console.log(a);
if (4>a&&a>0 && row.column.label==='下次校准日期') {
return "background:yellow";
}
else if (a<0 && row.column.label==='下次校准日期') {
return "background:red";
}
return "";
}
},
setClass:function(check_date) {
let obj = {};
if(check_date!=null){
let dat = new Date();
let time = dat.getTime();
let check = new Date(check_date).getTime();
let timeDiffer = (check-time)/1000/60/60/24;
if (4>timeDiffer&&timeDiffer>0) {
obj = 'warning';
}else if (timeDiffer<0) {
obj = "danger";
}
}
return obj;
},
//组员列表
getUserList() {
getUserList({ page: 0 }).then((res) => {
this.keeperOptions = genTree(res.data);
});
},
//部门列表
getOrgList() {
getOrgList({ page: 0 }).then((res) => {
this.depOptions = genTree(res.data);
this.keeperOptions = res.data;
});
},
handleFilter() {
this.listQuery.page = 1;

View File

@ -1,18 +1,21 @@
<template>
<div class="app-container">
<el-card >
<el-card>
<el-button type="primary" icon="el-icon-plus" @click="handleorder"
>选择订单
</el-button>
<el-table
v-loading="listLoading"
:data="iproductData.results"
ref="multipleTable"
border
fit
stripe
highlight-current-row
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
height="100"
v-el-height-adaptive-table="{ bottomOffset: 42 }"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="index" width="50" />
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -21,48 +24,79 @@
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
<el-table-column label="成品名称">
<el-table-column label="成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="所在仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
<template slot-scope="scope">{{
scope.row.warehouse_.name
}}</template>
</el-table-column>
<el-table-column label="是否已军检">
<el-table-column label="订单">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
<el-tag v-else>已军检</el-tag></template>
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.number
}}</el-span>
<el-tag
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
需要确定订单
</el-tag>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="是否售出">
<el-table-column label="合同">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_saled == false">未售出</el-tag>
<el-tag v-else>已售出</el-tag></template>
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.contract_.name
}}</el-span>
<el-span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</el-span>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="军检">
<el-table-column label="客户">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.customer_.name
}}</el-span>
<el-span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</el-span>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30"
@click="handleMtest(scope)"
>军检
</el-link>
</template>
</el-table-column>
<el-table-column label="军检">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag>
<el-span v-else></el-span
></template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="
checkPermission(['warehouse_update']) &&
scope.row.act_state == 30
"
@click="handleMtest(scope)"
>军检
</el-link>
</template>
</el-table-column>!-->
</el-table>
<pagination
v-show="iproductData.count > 0"
@ -71,31 +105,82 @@
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
<el-dialog title="军检" :visible.sync="dialogVisible">
<el-form :model="mtestform" label-width="130px"
label-position="right">
<el-form-item label="是否军检合格" prop="name">
<el-switch v-model="mtestform.is_mtestok"></el-switch>
</el-form-item>
<el-form-item label="军检备注" prop="name">
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submtest"> </el-button>
</div>
</el-dialog>
<el-dialog title="军检" :visible.sync="dialogVisible">
<el-form :model="mtestform" label-width="130px" label-position="right">
<el-form-item label="是否军检合格" prop="name">
<el-switch v-model="mtestform.is_mtestok"></el-switch>
</el-form-item>
<el-form-item label="军检备注" prop="name">
<el-input
type="textarea"
v-model="mtestform.remark_mtest"
></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submtest"> </el-button>
</div>
</el-dialog>
<el-dialog
title="指定发货订单"
:close-on-click-modal="false"
:visible.sync="dialogFormVisibleorder"
>
<el-descriptions :column="5" border style="margin-bottom: 20px">
<el-descriptions-item label="原订单">{{ this.ordershow }}</el-descriptions-item>
<el-descriptions-item label="原客户">{{ this.customershow }}</el-descriptions-item>
<el-descriptions-item label="原合同" >{{ this.contractshow }}</el-descriptions-item>
</el-descriptions>
<el-table
v-loading="listLoading"
:data="orderList"
border
fit
stripe
highlight-current-row
height="100"
v-el-height-adaptive-table="{ bottomOffset: 42 }"
>
<el-table-column type="index" width="50" />
<el-table-column label="订单编号" width="160" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="客户" width="200" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.customer_.name
}}</template>
</el-table-column>
<el-table-column label="所属合同" width="200" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.contract">{{
scope.row.contract_.name
}}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="120">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
@click="toorders(scope)"
>确认
</el-link>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisibleorder = false"> </el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import { getiproductList} from "@/api/inm";
import { getiproductList } from "@/api/inm";
import checkPermission from "@/utils/permission";
import { mtest } from "@/api/wpm";
import { getOrderList } from "@/api/sam";
import { mtest, toorder } from "@/api/wpm";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -103,22 +188,30 @@ export default {
components: { Pagination },
data() {
return {
iproductData: {
count: 0,
},
listQuery: {
listQuery: {
page: 1,
page_size: 20,
},
mtest: {},
salesdetail:"",
saleproduct:"",
dialogVisible:false,
mtestform:{
is_mtestok:false,
}
mtest: {},
salesdetail: "",
saleproduct: "",
dialogVisible: false,
mtestform: {
is_mtestok: false,
},
form1: {},
dialogFormVisibleorder: false,
orderList: [],
mutipID1: [],
mutipID: [],
mtmId: [],
ordershow: "",
customershow:"",
contractshow:"",
materialshow: [],
};
},
computed: {},
@ -131,28 +224,64 @@ export default {
//半成品列表
getList() {
this.listLoading = true;
this.listQuery.material__type=1;
this.listQuery.material__type = 1;
this.listQuery.is_saled = false;
getiproductList(this.listQuery).then((response) => {
if (response.data) {
this.iproductData= response.data;
this.iproductData = response.data;
}
this.listLoading = false;
});
},
handleMtest(scope){
this.saleproduct=scope.row.id;
this.dialogVisible=true;
},
submtest(){
mtest(this.saleproduct,this.mtestform).then((res)=>{
if(res.code >= 200)
{
this.$message.success("提交成功!");
this.dialogVisible=false;
}
});
}
handleMtest(scope) {
this.saleproduct = scope.row.id;
this.dialogVisible = true;
},
submtest() {
mtest(this.saleproduct, this.mtestform).then((res) => {
if (res.code >= 200) {
this.$message.success("提交成功!");
this.dialogVisible = false;
}
});
},
//批量选择成品发给谋订单
handleorder() {
this.dialogFormVisibleorder = true;
let _this = this;
_this.mutipID1 = [];
_this.mtmId = [];
_this.materialshow = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID1.push(item.wproduct);
_this.mtmId.push(item.material_.id);
_this.materialshow.push(item);
});
this.ordershow = _this.materialshow[0].number;
this.customershow=_this.materialshow[0].order_.customer_.name;
this.contractshow=_this.materialshow[0].order_.contract_.name;
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(
(response) => {
if (response.data) {
this.orderList = response.data;
}
this.listLoading = false;
}
);
},
//提交批量产品选择的订单
toorders(scope) {
toorder({
order: scope.row.id,
wproducts: this.mutipID1,
}).then((res) => {
if (res.code >= 200) {
this.$message.success("成功!");
this.dialogFormVisibleorder = false;
this.getList();
}
});
},
},
};
</script>

View File

@ -64,7 +64,7 @@
<el-table-column label="计划完工时间" width="110">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
</el-table-column>
<el-table-column label="付截止时间" width="110">
<el-table-column label="货日期" width="110">
<template slot-scope="scope">{{ scope.row.order_.delivery_date }}</template>
</el-table-column>

View File

@ -110,10 +110,15 @@
<el-table-column label="生产所需数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column>
<el-table-column label="库存量">
<template slot-scope="scope">{{ scope.row.inv_count }}</template>
<el-table-column label="剩余量" >
<template slot-scope="scope">
<el-tag v-if="scope.row.count_safe!=null&&scope.row.count_safe>(scope.row.inv_count-scope.row.count)" type="danger"> {{ scope.row.inv_count-scope.row.count }}</el-tag>
<el-tag v-else> {{ scope.row.inv_count-scope.row.count }}</el-tag>
</template>
</el-table-column>
<el-table-column label="安全库存">
<template slot-scope="scope">{{ scope.row.count_safe }}</template>
</el-table-column>
</el-table>
@ -143,6 +148,31 @@
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="设备状态">
<template slot-scope="scope">
<div v-if="scope.row.equip_.type===2">
<el-tag v-if="scope.row.equip_.state===40" type="danger">
禁用
</el-tag>
<el-tag v-else type="success">
合格
</el-tag>
</div>
<div v-else>
<el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===20">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===30" type="warning">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</div>
</template>
<template slot-scope="scope"> {{state_[scope.row.state]}}</template>
</el-table-column>
<el-table-column label="设备编号">
@ -200,12 +230,12 @@ export default {
"6":'辅助工具',
},
state_:{
0:'完好',
1:'限用',
2:'在修',
3:'禁用',
},
state_: {
10: '完好',
20: '限用',
30: '在修',
40: '禁用',
},
listQuery: {
page: 1,
page_size: 20,

View File

@ -8,67 +8,66 @@
border
fit
stripe
highlight-current-row
height="620"
v-el-height-adaptive-table="{ bottomOffset: 40 }"
>
<el-table-column type="index" width="50" />
<el-table-column label="任务编号">
<el-table-column label="任务编号" align="center">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="产品名称">
<el-table-column label="产品名称" align="center">
<template slot-scope="scope">{{
scope.row.product_.name
}}</template>
</el-table-column>
<el-table-column label="规格型号">
<el-table-column label="规格型号" align="center">
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
</el-table-column>
<el-table-column label="合格率">
<el-table-column label="冷加工">
<el-table-column label="合格率" align="center">
<el-table-column label="冷加工" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['01']"
>{{ scope.row.process_json["01"].rate }}%</template
>
</el-table-column>
<el-table-column label="热弯">
<el-table-column label="热弯" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['02']"
>{{ scope.row.process_json["02"].rate }}%</template
>
</el-table-column>
<el-table-column label="化学钢化">
<el-table-column label="化学钢化" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['03']"
>{{ scope.row.process_json["03"].rate }}%</template
>
</el-table-column>
<el-table-column label="镀膜">
<el-table-column label="镀膜" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['05']"
>{{ scope.row.process_json["05"].rate }}%</template
>
</el-table-column>
<el-table-column label="夹层">
<el-table-column label="夹层" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['06']"
>{{ scope.row.process_json["06"].rate }}%</template
>
</el-table-column>
<el-table-column label="包边">
<el-table-column label="包边" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['07']"
>{{ scope.row.process_json["07"].rate }}%</template
>
</el-table-column>
<el-table-column label="装框">
<el-table-column label="装框" align="center">
<template slot-scope="scope" v-if="scope.row.process_json['08']"
>{{ scope.row.process_json["08"].rate }}%</template
>
</el-table-column>
</el-table-column>
<el-table-column label="创建时间">
<el-table-column label="创建时间" align="center">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
</el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"

View File

@ -2,9 +2,56 @@
<div class="app-container">
<el-card>
<el-table
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="待军检" name="first">
<el-button type="primary" icon="el-icon-plus" @click="handleorder"
>申请
</el-button>
<el-table
v-loading="listLoading"
:data="iproductData.results"
ref="multipleTable"
border
fit
stripe
highlight-current-row
max-height="700"
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="index" width="50" />
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="成品批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
<el-table-column label="成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="所在仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
</el-table-column>
</el-table>
<pagination
v-show="iproductData.count > 0"
:total="iproductData.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="军检列表" name="second">
<el-table
v-loading="listLoading2"
:data="iproductData2.results"
border
fit
stripe
@ -28,21 +75,57 @@
<el-table-column label="所在仓库">
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
</el-table-column>
<el-table-column label="是否已军检">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag>
<el-tag v-else>已军检</el-tag></template>
<el-table-column label="订单">
<template slot-scope="scope">
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.number
}}</el-span>
<el-tag
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
需要确定订单
</el-tag>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="合同">
<template slot-scope="scope">
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.contract_.name
}}</el-span>
<el-span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</el-span>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="客户">
<template slot-scope="scope">
<el-span v-if="scope.row.to_order_">{{
scope.row.to_order_.customer_.name
}}</el-span>
<el-span
v-else-if="
scope.row.to_order_ == null && scope.row.need_to_order == true
"
>
</el-span>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="军检">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag>
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag>
<el-span v-else></el-span></template>
</el-table-column>
<el-table-column
@ -53,21 +136,25 @@
<template slot-scope="scope">
<el-link
v-if="scope.row.is_mtested == false"
v-if="scope.row.is_mtestok==null"
@click="handleMtest(scope)"
>军检</el-link
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="iproductData.count > 0"
:total="iproductData.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
v-show="iproductData2.count > 0"
:total="iproductData2.count"
:page.sync="listQuery2.page"
:limit.sync="listQuery2.page_size"
@pagination="getList2"
/>
</el-tab-pane>
</el-tabs>
<el-dialog
:visible.sync="dialogVisible"
:close-on-click-modal="false"
@ -87,7 +174,7 @@
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="mtest.remark" placeholder="备注" />
<el-input v-model="mtest.remark_mtest" placeholder="备注" />
</el-form-item>
</el-form>
@ -103,7 +190,7 @@
<script>
import { getiproductList,saleMtest} from "@/api/inm";
import checkPermission from "@/utils/permission";
import { mtest, needtoorder, } from "@/api/wpm";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -118,47 +205,84 @@ export default {
listQuery: {
page: 1,
page_size: 20,
},
iproductData2: {
count: 0,
},
listQuery2: {
page: 1,
page_size: 20,
},
mtest: {},
salesdetail:"",
saleproduct:"",
dialogVisible:false,
activeName: 'first',
mutipID1:[],
};
},
computed: {},
watch: {},
created() {
this.getList();
this.getList2();
},
methods: {
checkPermission,
//半成品列表
getList() {
this.listLoading = true;
this.listQuery.material__type=1;
getList(){
this.listQuery.material__type = 1;
this.listQuery.need_to_order=false;
getiproductList(this.listQuery).then((response) => {
if (response.data) {
this.iproductData= response.data;
}
this.listLoading = false;
});
},
},
getList2(){
this.listQuery2.material__type = 1;
getiproductList(this.listQuery2).then((response) => {
if (response.data) {
this.iproductData2= response.data;
}
});
},
handleMtest(scope){
this.saleproduct=scope.row.id;
this.saleproduct=scope.row.wproduct;
this.dialogVisible=true;
},
smtconfirm(){
saleMtest(this.saleproduct,this.mtest).then((res) => {
mtest(this.saleproduct,this.mtest).then((res) => {
if (res.code >= 200) {
this.getList();
this.getList2();
this.dialogVisible = false;
this.$message.success("成功");
}
});
},
//批量申请
handleorder() {
let _this = this;
_this.mutipID1 = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID1.push(item.wproduct);
});
needtoorder({
wproducts: this.mutipID1,
}).then((res) => {
if (res.code >= 200) {
this.$message.success("申请成功!");
this.getList();
}
});
}
},
};

View File

@ -23,12 +23,7 @@
<el-table-column label="型号规格">
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="军检状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
</template>
</el-table-column>
<el-table-column label="军检结论">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>

View File

@ -25,12 +25,7 @@
<el-table-column label="型号规格">
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="军检状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
</template>
</el-table-column>
<el-table-column label="军检结论">
<template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
@ -132,7 +127,7 @@
/>
</el-tab-pane>
<el-tab-pane label="不合格" name="4">
<el-tab-pane label="不合格" name="4">
<el-table
v-loading="listLoading"
:data="fifodetailList4.results"

View File

@ -66,7 +66,11 @@
<el-table-column label="已交货数量" width="150" >
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
</el-table-column>
<el-table-column label="是否需要军检" width="150" >
<template slot-scope="scope">
<el-tag v-if="scope.row.need_mtest == false"></el-tag>
<el-tag v-else-if="scope.row.need_mtest == true"></el-tag></template>
</el-table-column>
<el-table-column label="创建时间" width="160" >
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
@ -167,7 +171,9 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否军检">
<el-switch v-model="order.need_mtest"></el-switch>
</el-form-item>
</el-form>
<div style="text-align: right">
@ -186,6 +192,7 @@ import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaulteorder = {
need_mtest:false,
};
export default {
components: { Pagination },

View File

@ -55,7 +55,7 @@
</el-table-column>
<el-table-column label="合同名称" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.order&&scope.row.order_.contract">{{ scope.row.order_.contract_.name }}</template>
<template slot-scope="scope" v-if="scope.row.order_">{{ scope.row.order_.contract_.name }}</template>
</el-table-column>
<el-table-column label="是否审核" >
@ -227,7 +227,7 @@ export default {
orderoptions:[],
customeroptions:[],
materialoptions:[],
iproductoptions:"",
iproductoptions:[],
dialogVisible: false,
dialogType: "new",
@ -238,7 +238,7 @@ export default {
created() {
this.getList();
this.getCustomerLists();
this.getproductList();
// this.getproductList();
this.getOrderLists();
this.getMaterialList();
},
@ -307,15 +307,15 @@ export default {
//成品
getproductList() {
// getproductList() {
getiproductList({page:0,material__type:1}).then((response) => {
if (response.data) {
this.iproductoptions=response.data;
}
// getiproductList({page:0,material__type:1}).then((response) => {
// if (response.data) {
// this.iproductoptions=response.data;
// }
});
},
// });
// },
//根据选择的产品弹出对应库里的产品
selectproduct(){
getiproductList({page:0,material__type:1,material:this.sale.product}).then((response) => {
@ -344,7 +344,8 @@ selectproduct(){
this.dialogVisible = true;
this.iproducts=[];
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
this.$refs["Form"].resetFields();
this.iproductoptions=[];
});
},
@ -354,7 +355,7 @@ selectproduct(){
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
this.$refs["Form"].resetFields();
});
},
handleDelete(scope) {

View File

@ -131,19 +131,29 @@
</el-table-column>
<el-table-column label="设备状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.state===0" type="success">
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===1" type="warning">
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===2" >
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.equip_.state] }}
</el-tag>
</template>
<div v-if="scope.row.equip_.type===2">
<el-tag v-if="scope.row.equip_.state===40" type="danger">
禁用
</el-tag>
<el-tag v-else type="success">
合格
</el-tag>
</div>
<div v-else>
<el-tag v-if="scope.row.equip_.state===10" type="success">
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else-if="scope.row.equip_.state===20">
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else-if="scope.row.equip_.state===30" type="warning">
{{ state_[scope.row.equip_.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.equip_.state] }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="100px">
@ -572,8 +582,12 @@
</div>
</template>
<style scoped>
.word-wrap {
padding: 25px;
};
.box-card {
height: 300px;
}
</style>
<script>
@ -619,12 +633,12 @@ export default {
page: 1,
page_size: 20,
},
state_:{
0:'完好',
1:'限用',
2:'在修',
3:'禁用',
},
state_: {
10: '完好',
20: '限用',
30: '在修',
40: '禁用',
},
scrap: [
{ lable: "使用", value: true },
{ lable: "不使用", value: false },

View File

@ -65,9 +65,7 @@
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>批量入库
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleorder"
>批量选择订单
</el-button>
<el-table
v-loading="listLoading"
@ -282,33 +280,7 @@
</div>
</el-dialog>
<el-dialog
title="指定发货订单"
:close-on-click-modal="false"
:visible.sync="dialogFormVisibleorder"
>
<el-form :model="form">
<el-form-item label="订单">
<el-select
style="width: 100%"
v-model="form.order"
placeholder="请选择订单"
>
<el-option
v-for="item in orderList"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisibleorder = false"> </el-button>
<el-button type="primary" @click="toorders"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
@ -341,6 +313,7 @@ export default {
return {
testitem: defaultetestitem,
form: { remark: "", warehouse: "" },
form1: {},
wproductList: {
count: 0,
},
@ -411,11 +384,7 @@ export default {
testrecord: {},
formName: "检验表",
WarehouseData: "",
dialogFormVisibleorder: false,
orderList: [],
mutipID1: [],
mutipID: [],
mtmId: [],
};
},
computed: {},
@ -451,37 +420,7 @@ export default {
}
});
},
//批量选择成品发给谋订单
handleorder() {
this.dialogFormVisibleorder = true;
let _this = this;
_this.mutipID1 = [];
_this.mtmId = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID1.push(item.id);
_this.mtmId.push(item.material_.id);
});
getOrderList({ page: 0, material: _this.mtmId[0] }).then((response) => {
if (response.data) {
this.orderList = response.data;
}
this.listLoading = false;
});
},
//提交批量产品选择的订单
toorders() {
toorder({
order: this.form.order,
wproducts: this.mutipID1,
}).then((res) => {
if (res.code >= 200) {
this.$message.success("成功!");
this.dialogFormVisibleorder = false;
this.getList1();
}
});
},
//成品批量入库
handleCreate() {
this.dialogFormVisibles = true;