xiuagi
This commit is contained in:
parent
60f726cda6
commit
6de8c40d60
|
@ -368,3 +368,12 @@ export function toorder(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
//申请
|
||||
export function needtoorder(data) {
|
||||
return request({
|
||||
url: '/wpm/wproduct/need_to_order/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -63,7 +63,10 @@
|
|||
</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>
|
||||
|
||||
|
@ -437,35 +440,20 @@ 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";
|
||||
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";
|
||||
}
|
||||
else if (a<0 && row.column.label==='下次校准日期') {
|
||||
|
||||
return "background:red";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
return obj;
|
||||
},
|
||||
//组员列表
|
||||
getUserList() {
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<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 }"
|
||||
>
|
||||
<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>
|
||||
|
@ -26,43 +29,74 @@
|
|||
</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="客户">
|
||||
<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 align="center" label="操作" width="220px">
|
||||
<!-- <el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30"
|
||||
v-if="
|
||||
checkPermission(['warehouse_update']) &&
|
||||
scope.row.act_state == 30
|
||||
"
|
||||
@click="handleMtest(scope)"
|
||||
>军检
|
||||
</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>!-->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="iproductData.count > 0"
|
||||
|
@ -72,30 +106,81 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||
<el-form :model="mtestform" label-width="130px"
|
||||
label-position="right">
|
||||
<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-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-card>
|
||||
<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 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,7 +188,6 @@ export default {
|
|||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
iproductData: {
|
||||
count: 0,
|
||||
},
|
||||
|
@ -117,8 +201,17 @@ export default {
|
|||
dialogVisible: false,
|
||||
mtestform: {
|
||||
is_mtestok: false,
|
||||
}
|
||||
|
||||
},
|
||||
form1: {},
|
||||
dialogFormVisibleorder: false,
|
||||
orderList: [],
|
||||
mutipID1: [],
|
||||
mutipID: [],
|
||||
mtmId: [],
|
||||
ordershow: "",
|
||||
customershow:"",
|
||||
contractshow:"",
|
||||
materialshow: [],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -132,6 +225,7 @@ export default {
|
|||
getList() {
|
||||
this.listLoading = true;
|
||||
this.listQuery.material__type = 1;
|
||||
this.listQuery.is_saled = false;
|
||||
getiproductList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.iproductData = response.data;
|
||||
|
@ -140,19 +234,54 @@ export default {
|
|||
});
|
||||
},
|
||||
handleMtest(scope) {
|
||||
|
||||
this.saleproduct = scope.row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submtest() {
|
||||
mtest(this.saleproduct, this.mtestform).then((res) => {
|
||||
if(res.code >= 200)
|
||||
{
|
||||
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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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="设备编号">
|
||||
|
@ -201,10 +231,10 @@ export default {
|
|||
|
||||
},
|
||||
state_: {
|
||||
0:'完好',
|
||||
1:'限用',
|
||||
2:'在修',
|
||||
3:'禁用',
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
|
|
|
@ -2,9 +2,56 @@
|
|||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<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
|
||||
|
@ -29,13 +76,56 @@
|
|||
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<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
|
||||
|
@ -46,7 +136,7 @@
|
|||
<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
|
||||
>
|
||||
|
@ -55,12 +145,16 @@
|
|||
</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"
|
||||
|
@ -80,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>
|
||||
|
@ -96,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
|
||||
|
||||
|
@ -111,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;
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -127,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"
|
||||
|
|
|
@ -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 },
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -131,13 +131,28 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="设备状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.equip_.type===1&&scope.row.equip_.state===10" type="success">
|
||||
<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_.type===2&&scope.row.equip_.state===10" type="warning">
|
||||
{{ state2_[scope.row.equip_.state] }}
|
||||
<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>
|
||||
|
||||
|
@ -623,11 +638,6 @@ export default {
|
|||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
state2_: {
|
||||
10: "合格",
|
||||
|
||||
40: "禁用",
|
||||
},
|
||||
scrap: [
|
||||
{ lable: "使用", value: true },
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue