|
|
|
@ -69,17 +69,6 @@
|
|
|
|
|
v-hasPermi="['quality:qcInventory:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-magic-stick"
|
|
|
|
|
size="mini"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['quality:qcInventory:edit']"
|
|
|
|
|
>审核编辑</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -87,16 +76,16 @@
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
|
|
|
|
|
<el-table-column label="checkType" align="center" prop="checkType" v-if="false"/>
|
|
|
|
|
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="100"/>
|
|
|
|
|
<el-table-column label="库存批次号" align="center" prop="incomeBatchNo" width="100"/>
|
|
|
|
|
<el-table-column label="物料号" align="center" prop="materialCode" width="80"/>
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" width="100"/>
|
|
|
|
|
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
|
|
|
|
|
<!--<el-table-column label="库存批次号" align="center" prop="incomeBatchNo" width="100"/>-->
|
|
|
|
|
<el-table-column label="物料号" align="center" prop="materialCode" width="120" :formatter="productCodeFormate"/>
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="仓库编码" align="center" prop="supplierCode" width="90"/>
|
|
|
|
|
<el-table-column label="仓库名称" align="center" prop="supplierName" width="90"/>
|
|
|
|
|
<el-table-column label="检测地点" align="center" prop="checkLoc" width="100"/>
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="checkTime" width="100">
|
|
|
|
|
<!--<el-table-column label="检测地点" align="center" prop="checkLoc" width="100"/>-->
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="检测状态" align="center" prop="checkStatus" >
|
|
|
|
@ -115,6 +104,25 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="检验结果" align="center" prop="checkResult" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleCheckProject(scope.row)"
|
|
|
|
|
v-hasPermi="['quality:qcWarehousing:edit']"
|
|
|
|
|
>检验</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-magic-stick"
|
|
|
|
|
@click="handleCheckProjectM(scope.row)"
|
|
|
|
|
v-hasPermi="['quality:qcWarehousing:editM']"
|
|
|
|
|
>审核编辑</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
@ -147,24 +155,22 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
|
<el-input v-model="form.materialName" placeholder="请选择物料名称">
|
|
|
|
|
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
|
|
|
|
|
<el-form-item label="订单号" prop="orderNo">
|
|
|
|
|
<el-input v-model="form.orderNo" placeholder="请选择订单号" >
|
|
|
|
|
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="物料号" prop="materialCode">
|
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
|
<el-input v-model="form.materialName" placeholder="请输入物料名称" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="批次号" prop="incomeBatchNo">
|
|
|
|
|
<el-input v-model="form.incomeBatchNo" placeholder="请输入批次号">
|
|
|
|
|
</el-input>
|
|
|
|
|
<el-form-item label="物料号" prop="materialCode">
|
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
@ -174,11 +180,14 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="入库数量" prop="quality">
|
|
|
|
|
<el-input v-model="form.quality" placeholder="" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="仓库名称" prop="supplierName">
|
|
|
|
|
<el-input v-model="form.supplierName" placeholder="请选择供应商名称">
|
|
|
|
|
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
<el-input v-model="form.supplierName" placeholder="请选择供应商名称" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
@ -200,7 +209,6 @@
|
|
|
|
|
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -208,16 +216,11 @@
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!--物料选择弹窗-->
|
|
|
|
|
<ItemSelectMaterial
|
|
|
|
|
ref="itemSelectMaterial"
|
|
|
|
|
@onSelected="onSelectMaterial"
|
|
|
|
|
></ItemSelectMaterial>
|
|
|
|
|
<!--供应商选择弹窗-->
|
|
|
|
|
<ItemSelectSupplier
|
|
|
|
|
ref="itemSelectSupplier"
|
|
|
|
|
@onSelected="onSelectSupplier"
|
|
|
|
|
></ItemSelectSupplier>
|
|
|
|
|
<!--订单选择弹窗-->
|
|
|
|
|
<ItemPutInOrder
|
|
|
|
|
ref="itemSelectPutInOrder"
|
|
|
|
|
@onSelected="onSelectPutInOrder"
|
|
|
|
|
></ItemPutInOrder>
|
|
|
|
|
<!--人员选择弹窗-->
|
|
|
|
|
<ItemSelectUser
|
|
|
|
|
ref="itemSelectUser"
|
|
|
|
@ -234,15 +237,14 @@
|
|
|
|
|
<script>
|
|
|
|
|
import { listQcInventory, getQcInventory, addQcInventory, updateQcInventory, delQcInventory } from "@/api/quality/qcInventory.js";
|
|
|
|
|
import { getCheckTypes } from "@/api/quality/qcProduce";
|
|
|
|
|
import ItemSelectMaterial from "./selectMaterial.vue"
|
|
|
|
|
import ItemSelectSupplier from "./selectSupplier";
|
|
|
|
|
import ItemPutInOrder from "./selectPutInOrder.vue";
|
|
|
|
|
import ItemSelectUser from "../qcIncome/selectUser.vue";
|
|
|
|
|
import ItemSelectProject from "../qcIncome/checkProjectType.vue";
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
|
|
|
|
|
export default {
|
|
|
|
|
name: "Inventory",
|
|
|
|
|
components: { ItemSelectMaterial,ItemSelectSupplier,ItemSelectUser,ItemSelectProject},
|
|
|
|
|
components: {ItemPutInOrder,ItemSelectUser,ItemSelectProject},
|
|
|
|
|
dicts: ["unit","check_status","check_result"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -333,12 +335,17 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDate();
|
|
|
|
|
//this.getDate();
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getCheckTypes();
|
|
|
|
|
this.handleDefectType();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
productCodeFormate(row, column, cellValue){
|
|
|
|
|
if(cellValue != null){
|
|
|
|
|
return cellValue.slice(7,18); //返回值
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/****/
|
|
|
|
|
getCheckTypes() {
|
|
|
|
|
getCheckTypes('inventory').then(response => {
|
|
|
|
@ -364,12 +371,12 @@ export default {
|
|
|
|
|
/** 查询库存检验列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
console.log("--------"+this.queryParams)
|
|
|
|
|
|
|
|
|
|
if(this.queryParams.incomeTimeArray!=null && this.queryParams.incomeTimeArray.length>0){
|
|
|
|
|
this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
|
}else{
|
|
|
|
|
this.queryParams.incomeTimeStart = null;
|
|
|
|
|
this.queryParams.incomeTimeStart = null;
|
|
|
|
|
this.queryParams.incomeTimeEnd = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -522,14 +529,19 @@ export default {
|
|
|
|
|
this.form.materialCode = obj.code;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**供应商选择弹出框**/
|
|
|
|
|
handleSelectSupplier() {
|
|
|
|
|
this.$refs.itemSelectSupplier.showFlag = true;
|
|
|
|
|
/**工单选择弹出框**/
|
|
|
|
|
handleSelectWorkOrder() {
|
|
|
|
|
this.$refs.itemSelectPutInOrder.showFlag = true;
|
|
|
|
|
},
|
|
|
|
|
//供应商选择确认
|
|
|
|
|
onSelectSupplier(obj) {
|
|
|
|
|
this.form.supplierCode = obj.code;
|
|
|
|
|
this.form.supplierName = obj.name;
|
|
|
|
|
//工单选择确认
|
|
|
|
|
onSelectPutInOrder(obj) {
|
|
|
|
|
this.form.orderNo = obj.orderNo;
|
|
|
|
|
this.form.materialName = obj.materialName;
|
|
|
|
|
this.form.materialCode = obj.materialCode;
|
|
|
|
|
this.form.quality = obj.quality;
|
|
|
|
|
this.form.incomeTime = obj.incomeTime;
|
|
|
|
|
this.form.supplierName = obj.supplierName;//仓库编码
|
|
|
|
|
this.form.supplierCode = obj.supplierCode;//仓库名称
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**人员选择弹出框**/
|
|
|
|
@ -561,7 +573,12 @@ export default {
|
|
|
|
|
getDefectTypeListByDefectType(defectType).then(response => {
|
|
|
|
|
this.defectTypeList = response.rows;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//检验项目弹窗(二次编辑)
|
|
|
|
|
handleCheckProjectM(row){
|
|
|
|
|
this.$refs.itemSelectProject.showFlag = true;
|
|
|
|
|
this.$refs.itemSelectProject.init(row,'inventory');
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|