Compare commits
4 Commits
f360fa4d21
...
d26c8d776d
| Author | SHA1 | Date |
|---|---|---|
|
|
d26c8d776d | |
|
|
1b613f0d7f | |
|
|
79c579c55e | |
|
|
a0c7ea7097 |
|
|
@ -5,6 +5,17 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="tableAdd" v-auth="'qct.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<xtSelect
|
||||
:apiObj="$API.mtm.material.list"
|
||||
v-model="query.qctmat__material"
|
||||
v-model:obj="selectMaterialObj"
|
||||
:labelField="'full_name'"
|
||||
style="width: 600px;"
|
||||
:params="materialQuery"
|
||||
@change="selectMaterialChange"
|
||||
>
|
||||
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||
</xtSelect>
|
||||
<el-input v-model="query.search" placeholder="检验表名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
|
|
@ -91,7 +102,16 @@ import recordDialog from "./qctDetail.vue";
|
|||
data() {
|
||||
return {
|
||||
apiObj:this.$API.qm.qct.list,
|
||||
query: {search:''},
|
||||
query: {
|
||||
search:'',
|
||||
qctmat__material:'',
|
||||
},
|
||||
materialQuery: {
|
||||
page: 0,
|
||||
is_hidden: false,
|
||||
is_assemb: false,
|
||||
},
|
||||
selectMaterialObj: {},
|
||||
isSaving: false,
|
||||
showDrawer: false,
|
||||
limitedVisible: false,
|
||||
|
|
@ -196,6 +216,10 @@ import recordDialog from "./qctDetail.vue";
|
|||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
selectMaterialChange(row){
|
||||
this.query.qctmat__material = row ? row.id : '';
|
||||
this.handleQuery();
|
||||
},
|
||||
dialogClose(){
|
||||
this.isSaving = false;
|
||||
this.limitedVisible = false;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<span>{{ item.batch }}</span>
|
||||
<span v-if="item.material_&&item.material_.process_name">({{ item.material_.process_name }})</span>
|
||||
<span v-else>(原料棒)</span>
|
||||
<span v-if="item.defect!==null" style="color: red;">{{ item.defect_name }}</span>
|
||||
<el-tag v-if="item.defect!==null" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ item.defect_name }}</el-tag>
|
||||
<div style="float: right">
|
||||
<span>{{ item.count_canhandover }}</span>
|
||||
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
:value="item.id"
|
||||
>
|
||||
<span>{{ item.batch }}</span>
|
||||
<span v-if="item.defect_name&&item.defect_name!==null">({{ item.defect_name }})</span>
|
||||
<el-tag v-if="item.defect_name&&item.defect_name!==null" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ item.defect_name }}</el-tag>
|
||||
<span style="float: right;">{{ item.count_cando }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
:apiObj="apiObjM"
|
||||
v-model="selectObjIds"
|
||||
v-model:obj="selectObjs"
|
||||
v-model:label="selectMaterialLabel"
|
||||
:labelField="'batch'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsM"
|
||||
|
|
@ -47,7 +48,7 @@
|
|||
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可交接数量" prop="count_canhandover" width="110px"></el-table-column>
|
||||
|
|
@ -200,6 +201,7 @@
|
|||
:apiObj="apiObjM"
|
||||
v-model="selectObjIds"
|
||||
v-model:obj="selectObjs"
|
||||
v-model:label="selectMaterialLabel"
|
||||
:labelField="'batch'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsM"
|
||||
|
|
@ -211,7 +213,7 @@
|
|||
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可交接数量" prop="count_canhandover" width="110px"></el-table-column>
|
||||
|
|
@ -343,6 +345,7 @@ export default {
|
|||
},
|
||||
initForm:{},
|
||||
selectObjIds:[],
|
||||
selectMaterialLabel:"",
|
||||
apiObj:this.$API.mtm.material.list,
|
||||
apiObjM:null,
|
||||
params:{},
|
||||
|
|
@ -662,6 +665,7 @@ export default {
|
|||
//选中物料批次后,放入handoverb
|
||||
materialChange0(){
|
||||
let that = this;
|
||||
that.selectMaterialLabel = that.selectObjs.map(item => that.formatWmaterialLabel(item)).join(";");
|
||||
that.totalCount = 0;
|
||||
that.selectObjs.forEach(item=>{
|
||||
if(that.handoverbIds.indexOf(item.id)==-1){
|
||||
|
|
@ -692,6 +696,12 @@ export default {
|
|||
that.countChange();
|
||||
},500)
|
||||
},
|
||||
formatWmaterialLabel(row){
|
||||
if(!row || !row.batch){
|
||||
return "";
|
||||
}
|
||||
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
|
||||
},
|
||||
countChange(){
|
||||
let that = this;
|
||||
let totalCount = 0;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
:apiObj="apiObjM"
|
||||
v-model="form.wm_in"
|
||||
v-model:obj="selectObj"
|
||||
v-model:label="wmInLabel"
|
||||
:labelField="'batch'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsM"
|
||||
|
|
@ -55,7 +56,7 @@
|
|||
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||
<el-tag v-if="scope.row.defect_name" type="warning" size="small" effect="plain" style="margin-left: 8px;">{{ scope.row.defect_name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间库存" prop="count" width="110px"></el-table-column>
|
||||
|
|
@ -271,6 +272,7 @@ export default {
|
|||
],
|
||||
},
|
||||
selectObj:{count:0},
|
||||
wmInLabel:"",
|
||||
batch_count:null,
|
||||
codeBatch:"",
|
||||
materialFix:"",
|
||||
|
|
@ -400,7 +402,7 @@ export default {
|
|||
getdefects(material){
|
||||
let that = this;
|
||||
// let material = that.is_fix?that.materialFix:that.materialIn;
|
||||
that.$API.qm.qct.getQct.req({material: material,tag:'process'}).then((res) => {
|
||||
that.$API.qm.qct.getQct.req({material: material,tag:'process',type:'in'}).then((res) => {
|
||||
res.qct_defects.forEach((item) => {
|
||||
that.defectform[item.defect_name] = 0;
|
||||
})
|
||||
|
|
@ -420,6 +422,11 @@ export default {
|
|||
},
|
||||
materialBatchChange(){
|
||||
let that = this;
|
||||
if(!that.selectObj || !that.selectObj.id){
|
||||
that.wmInLabel = "";
|
||||
return;
|
||||
}
|
||||
that.wmInLabel = that.formatWmaterialLabel(that.selectObj);
|
||||
that.getRoute(that.selectObj.material);
|
||||
that.form.batch = that.selectObj.batch;
|
||||
that.form.count_use = that.selectObj.count_cando;
|
||||
|
|
@ -483,6 +490,12 @@ export default {
|
|||
})
|
||||
that.countCellChanges();
|
||||
},
|
||||
formatWmaterialLabel(row){
|
||||
if(!row || !row.batch){
|
||||
return "";
|
||||
}
|
||||
return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
let that = this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue