Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
451f50ff46
|
|
@ -124,7 +124,13 @@
|
|||
clockRecord(imgData).then((res) => {
|
||||
debugger;
|
||||
if (res.code === 200 && res.data.id) {
|
||||
this.$message.success(res.data.name + '签到成功!');
|
||||
// this.$message.success(res.data.name + '签到成功!');
|
||||
let messag = '<div style="font-size:30px"><strong> <i style="font-size:40px">'+res.data.name+'</i> 签到成功</strong></div>';
|
||||
this.$message.success({
|
||||
dangerouslyUseHTMLString: true,
|
||||
duration:4000,
|
||||
message: messag
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.uploadLock = false;
|
||||
}, 5000)
|
||||
|
|
@ -143,6 +149,9 @@
|
|||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-message .el-icon-success{
|
||||
font-size: 35px!important;
|
||||
}
|
||||
.faceLoginWrap{
|
||||
/*padding: 50px;*/
|
||||
/*width: 600px;*/
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
">子工序列表</span>
|
||||
</div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreateStep"
|
||||
>新增子工序</el-button>
|
||||
>新增子工序
|
||||
</el-button>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="stepList"
|
||||
|
|
@ -18,7 +19,7 @@
|
|||
max-height="600"
|
||||
@row-click="rowClick"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="子工序名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
|
@ -27,18 +28,19 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="相关设备">
|
||||
<template slot-scope="scope" v-if="scope.row.equipments">
|
||||
<el-tag v-for="item in scope.row.equipments_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
<el-tag
|
||||
v-for="item in scope.row.equipments_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number"
|
||||
>
|
||||
{{item.name}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="子工序类型">
|
||||
<template slot-scope="scope"> {{ type_[scope.row.type] }}</template>
|
||||
<el-table-column label="子工序类型">
|
||||
<template slot-scope="scope">{{ type_[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
|
|
@ -46,17 +48,17 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['step_update'])"
|
||||
type="primary"
|
||||
@click="handleEditStep(scope)"
|
||||
>编辑</el-link
|
||||
>
|
||||
编辑
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['step_delete'])"
|
||||
type="danger"
|
||||
@click="handleDeleteStep(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -73,40 +75,36 @@
|
|||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="工序名称" prop="name">
|
||||
<el-input v-model="step.name" placeholder="工序名称" />
|
||||
<el-input v-model="step.name" placeholder="工序名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="步骤编号" prop="number">
|
||||
<el-input v-model="step.number" placeholder="工序编号" />
|
||||
<el-input v-model="step.number" placeholder="工序编号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序设备" prop="equipments">
|
||||
|
||||
<el-select style="width: 100%" multiple v-model="step.equipments" placeholder="请选择">
|
||||
<el-select style="width: 100%" multiple v-model="step.equipments" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导书内容" prop="instruction_content">
|
||||
<el-input type="textarea" :rows="3" v-model="step.instruction_content" placeholder="指导书内容" />
|
||||
<el-input type="textarea" :rows="3" v-model="step.instruction_content" placeholder="指导书内容"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子工序类型" prop="type">
|
||||
<el-select style="width: 100%" v-model="step.type" placeholder="请选择">
|
||||
<el-form-item label="子工序类型" prop="type">
|
||||
<el-select style="width: 100%" v-model="step.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||
|
|
@ -116,15 +114,16 @@
|
|||
</el-card>
|
||||
<el-card>
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="9" >
|
||||
<el-card >
|
||||
<el-col :span="9">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px;
|
||||
font-weight: 700;
|
||||
">过程记录表</span>
|
||||
</div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="recordformList.results"
|
||||
border
|
||||
|
|
@ -135,17 +134,17 @@
|
|||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.enabled==true" >启用</el-tag>
|
||||
<el-tag v-else>禁用</el-tag>
|
||||
</template>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.enabled==true">启用</el-tag>
|
||||
<el-tag v-else>禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件号">
|
||||
<el-table-column label="文件号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -157,17 +156,20 @@
|
|||
v-if="checkPermission(['material_update'])"
|
||||
type="primary"
|
||||
@click="handleLook(scope)"
|
||||
>查看</el-link>
|
||||
>查看
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['material_update'])"
|
||||
type="primary"
|
||||
@click="handleEdit(scope)"
|
||||
>编辑</el-link>
|
||||
>编辑
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link>
|
||||
>删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -184,18 +186,18 @@
|
|||
>
|
||||
|
||||
<el-form-item label="表格名称" prop="name">
|
||||
<el-input v-model="recordform.name" placeholder="表格名称" />
|
||||
<el-input v-model="recordform.name" placeholder="表格名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件号" prop="number">
|
||||
<el-input v-model="recordform.number" placeholder="文件号" />
|
||||
<el-form-item label="文件号" prop="number">
|
||||
<el-input v-model="recordform.number" placeholder="文件号"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="recordform.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="recordform.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="表格类型" prop="type">
|
||||
<el-select style="width: 100%" v-model="recordform.type" placeholder="请选择">
|
||||
<el-select style="width: 100%" v-model="recordform.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.value"
|
||||
|
|
@ -206,7 +208,6 @@
|
|||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
|
@ -222,15 +223,15 @@
|
|||
label-width="80px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-row v-for="(item,$index) in fieldList.results" :key="$index">
|
||||
<el-form-item v-if="item.field_type==='string'" :label="item.field_name" >
|
||||
<el-input placeholder="请输入" v-model="item.sort"/>
|
||||
<el-row v-for="(item,$index) in fieldList.results" :key="$index">
|
||||
<el-form-item v-if="item.field_type==='string'" :label="item.field_name">
|
||||
<el-input placeholder="请输入" v-model="item.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="item.field_type==='int'" :label="item.field_name">
|
||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="item.field_type==='float'" :label="item.field_name">
|
||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="item.field_type==='date'" :label="item.field_name">
|
||||
<el-date-picker
|
||||
|
|
@ -253,7 +254,7 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="item.field_type==='select'" :label="item.field_name">
|
||||
<el-select style="width: 100%" v-model="item.sort" placeholder="请选择">
|
||||
<el-select style="width: 100%" v-model="item.sort" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item1 in item.field_choice"
|
||||
:key="item1"
|
||||
|
|
@ -263,7 +264,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="item.field_type==='selects'" :label="item.field_name">
|
||||
<el-select style="width: 100%" v-model="optio" multiple placeholder="请选择">
|
||||
<el-select style="width: 100%" v-model="optio" multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item1 in item.field_choice"
|
||||
:key="item1"
|
||||
|
|
@ -275,21 +276,22 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<!--<div style="text-align: right">-->
|
||||
<!--<el-button type="danger">取消</el-button>-->
|
||||
<!--<el-button type="primary">确认</el-button>-->
|
||||
<!--<el-button type="danger">取消</el-button>-->
|
||||
<!--<el-button type="primary">确认</el-button>-->
|
||||
<!--</div>-->
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="15" >
|
||||
<el-card >
|
||||
<el-col :span="15">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px;
|
||||
font-weight: 700;
|
||||
">记录字段</span>
|
||||
</div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handlefieldCreate"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
<el-table
|
||||
|
||||
:data="fieldList.results"
|
||||
|
|
@ -302,7 +304,7 @@
|
|||
|
||||
>
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="字段类型">
|
||||
<template slot-scope="scope">{{ options_[scope.row.field_type] }}</template>
|
||||
</el-table-column>
|
||||
|
|
@ -314,7 +316,7 @@
|
|||
<el-table-column label="字段标识">
|
||||
<template slot-scope="scope">{{ scope.row.field_key }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="选项显示名">
|
||||
<template slot-scope="scope">{{ scope.row.field_choice }}</template>
|
||||
</el-table-column>
|
||||
|
|
@ -331,29 +333,32 @@
|
|||
v-if="checkPermission(['material_update'])"
|
||||
type="primary"
|
||||
@click="handlefieldEdit(scope)"
|
||||
>编辑</el-link
|
||||
>编辑
|
||||
</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handlefieldDelete(scope)"
|
||||
>删除</el-link
|
||||
>删除
|
||||
</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="fieldList.count > 0"
|
||||
:total="fieldList.count"
|
||||
:page.sync="listQueryfield.page"
|
||||
:limit.sync="listQueryfield.page_size"
|
||||
@pagination="fieldLists"
|
||||
/>
|
||||
<el-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false" :title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'">
|
||||
<pagination
|
||||
v-show="fieldList.count > 0"
|
||||
:total="fieldList.count"
|
||||
:page.sync="listQueryfield.page"
|
||||
:limit.sync="listQueryfield.page_size"
|
||||
@pagination="fieldLists"
|
||||
/>
|
||||
<el-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false"
|
||||
:title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'">
|
||||
<el-form ref="Form" :model="field" label-width="80px" label-position="right">
|
||||
<el-form-item label="字段类型" prop="field_type">
|
||||
<el-select style="width: 100%" v-model="field.field_type" placeholder="请选择">
|
||||
<el-select style="width: 100%" v-model="field.field_type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in fieldtypeoptions"
|
||||
:key="item.value"
|
||||
|
|
@ -363,27 +368,31 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="字段标识" prop="field_key">
|
||||
<el-input v-model="field.field_key" placeholder="字段标识" onkeyup="value=value.replace(/[^A-Za-z_\/]/ig,'')"/>
|
||||
<el-input v-model="field.field_key" placeholder="字段标识"
|
||||
onkeyup="value=value.replace(/[^A-Za-z_\/]/ig,'')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="字段名称" prop="field_name">
|
||||
<el-input v-model="field.field_name" placeholder="字段名称" />
|
||||
<el-input v-model="field.field_name" placeholder="字段名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="选项" v-show="field.field_type=='radio'||field.field_type=='checkbox'||field.field_type=='select'||field.field_type=='selects'">
|
||||
<el-form-item label="选项"
|
||||
v-show="field.field_type=='radio'||field.field_type=='checkbox'||field.field_type=='select'||field.field_type=='selects'"
|
||||
>
|
||||
<el-button @click.prevent="addDomain" style="border: none;">
|
||||
<i class="el-icon-circle-plus-outline"></i>
|
||||
<span style="font-size:14px;">添加</span>
|
||||
</el-button>
|
||||
<el-row v-for="(domain, $index) in field_choice" :key=domain+$index style="margin-bottom: 10px">
|
||||
<el-col :span="20">
|
||||
<el-input v-model="field_choice[$index]" auto-complete="off"></el-input>
|
||||
<el-input v-model="field_choice[$index]" auto-complete="off"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="3" style="text-align: center" v-if="$index!==0">
|
||||
<i class="el-icon-remove-outline" @click.prevent="removeDomain($index,'1')" style="color: red;font-size: 16px;"></i>
|
||||
<i class="el-icon-remove-outline" @click.prevent="removeDomain($index,'1')"
|
||||
style="color: red;font-size: 16px;"></i>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
|
||||
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
|
|
@ -399,63 +408,70 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getStepLists, createStep,updateStep,deleteStep } from "@/api/mtm";
|
||||
import {getStepLists, createStep, updateStep, deleteStep} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getEquipmentAll } from "@/api/equipment";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
import { getStep,getrecordformList,createrecordform,updaterecordform,deleterecordform,getrffieldList,createrffield,updaterffield,
|
||||
deleterffield} from "@/api/mtm";
|
||||
import {getEquipmentAll} from "@/api/equipment";
|
||||
import {upUrl, upHeaders} from "@/api/file";
|
||||
import {
|
||||
getStep,
|
||||
getrecordformList,
|
||||
createrecordform,
|
||||
updaterecordform,
|
||||
deleterecordform,
|
||||
getrffieldList,
|
||||
createrffield,
|
||||
updaterffield,
|
||||
deleterffield
|
||||
} from "@/api/mtm";
|
||||
import vueJsonEditor from 'vue-json-editor'
|
||||
import { genTree } from "@/utils";
|
||||
import {genTree} from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultstep = {
|
||||
name: "",
|
||||
number: "",
|
||||
type:null,
|
||||
type: null,
|
||||
};
|
||||
|
||||
const defaultrecordform = {
|
||||
enabled:true
|
||||
};
|
||||
const defaultfield = {
|
||||
|
||||
enabled: true
|
||||
};
|
||||
const defaultfield = {};
|
||||
export default {
|
||||
components: { Pagination,vueJsonEditor },
|
||||
components: {Pagination, vueJsonEditor},
|
||||
data() {
|
||||
return {
|
||||
step: defaultstep,
|
||||
stepList:[],
|
||||
stepList: [],
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList:{
|
||||
count: 0,
|
||||
},
|
||||
fileList: {
|
||||
count: 0,
|
||||
},
|
||||
listLoading: true,
|
||||
dialogVisibles: false,
|
||||
dialogVisibleForm: false,
|
||||
dialogTypes: "new",
|
||||
field: {
|
||||
field_type:'',
|
||||
field_key:'',
|
||||
field_name:'',
|
||||
sort:'',
|
||||
field_choice:[""],
|
||||
field_type: '',
|
||||
field_key: '',
|
||||
field_name: '',
|
||||
sort: '',
|
||||
field_choice: [""],
|
||||
},
|
||||
field_choice:[''],
|
||||
options:[],
|
||||
optio:[],
|
||||
field_choice: [''],
|
||||
options: [],
|
||||
optio: [],
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
},
|
||||
recordform: defaultrecordform,
|
||||
dialogType: "new",
|
||||
dialogVisible:false,
|
||||
dialogVisible: false,
|
||||
dialogType1: "new",
|
||||
dialogVisible1:false,
|
||||
tableForm:{
|
||||
name:'',
|
||||
dialogVisible1: false,
|
||||
tableForm: {
|
||||
name: '',
|
||||
},
|
||||
listQueryrecordform: {
|
||||
page: 1,
|
||||
|
|
@ -472,15 +488,15 @@
|
|||
page_size: 20,
|
||||
},
|
||||
type_: {
|
||||
1:'常规',
|
||||
2:'分割',
|
||||
3:'结合',
|
||||
|
||||
1: '常规',
|
||||
2: '分割',
|
||||
3: '结合',
|
||||
|
||||
},
|
||||
options_: {
|
||||
'string':'文本',
|
||||
'int':'整数',
|
||||
'float':'小数',
|
||||
'string': '文本',
|
||||
'int': '整数',
|
||||
'float': '小数',
|
||||
'date': '日期',
|
||||
'datetime': '日期时间',
|
||||
'select': '单选',
|
||||
|
|
@ -551,15 +567,15 @@
|
|||
this.field_choice.push('')
|
||||
},
|
||||
//删除字段选项
|
||||
removeDomain(index){
|
||||
removeDomain(index) {
|
||||
this.field_choice.splice(index, 1)
|
||||
},
|
||||
handleLook(scope){
|
||||
handleLook(scope) {
|
||||
debugger;
|
||||
console.log(scope);
|
||||
this.dialogVisibleForm = true;
|
||||
this.tableForm = Object.assign({}, scope.row); // copy obj
|
||||
this.formID=this.tableForm.id;
|
||||
this.formID = this.tableForm.id;
|
||||
this.fieldLists();
|
||||
},
|
||||
checkPermission,
|
||||
|
|
@ -591,13 +607,11 @@
|
|||
handleUpSuccess(res, file, filelist) {
|
||||
this.step.instruction = res.data.id;
|
||||
},
|
||||
handleRemove(file, filelist){
|
||||
handleRemove(file, filelist) {
|
||||
this.step.instruction = null;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
|
@ -620,7 +634,7 @@
|
|||
},
|
||||
rowClick(row) {
|
||||
|
||||
this.stepid= row.id ;
|
||||
this.stepid = row.id;
|
||||
this.recordformLists();
|
||||
},
|
||||
|
||||
|
|
@ -677,15 +691,14 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
handleCurrentChange(row){
|
||||
this.formID=row.id;
|
||||
handleCurrentChange(row) {
|
||||
this.formID = row.id;
|
||||
this.fieldLists();
|
||||
|
||||
},
|
||||
recordformLists()
|
||||
{
|
||||
this.listQueryrecordform.step=this.stepid;
|
||||
this.listQueryrecordform.type=10;
|
||||
recordformLists() {
|
||||
this.listQueryrecordform.step = this.stepid;
|
||||
this.listQueryrecordform.type = 10;
|
||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||
if (response.data) {
|
||||
this.recordformList = response.data;
|
||||
|
|
@ -693,9 +706,8 @@
|
|||
|
||||
});
|
||||
},
|
||||
fieldLists()
|
||||
{
|
||||
this.listQueryfield.form=this.formID
|
||||
fieldLists() {
|
||||
this.listQueryfield.form = this.formID
|
||||
getrffieldList(this.listQueryfield).then((response) => {
|
||||
if (response.data) {
|
||||
this.fieldList = response.data;
|
||||
|
|
@ -777,7 +789,7 @@
|
|||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
this.recordform.step=this.stepid
|
||||
this.recordform.step = this.stepid
|
||||
|
||||
updaterecordform(this.recordform.id, this.recordform).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
|
@ -787,7 +799,7 @@
|
|||
}
|
||||
});
|
||||
} else {
|
||||
this.recordform.step=this.stepid
|
||||
this.recordform.step = this.stepid
|
||||
|
||||
createrecordform(this.recordform).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
|
@ -807,7 +819,7 @@
|
|||
if (valid) {
|
||||
const isEdit = this.dialogType1 === "edit";
|
||||
if (isEdit) {
|
||||
this.field.form=this.formID;
|
||||
this.field.form = this.formID;
|
||||
this.field.field_choice = this.field_choice;
|
||||
updaterffield(this.field.id, this.field).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
|
@ -817,7 +829,7 @@
|
|||
}
|
||||
});
|
||||
} else {
|
||||
this.field.form=this.formID;
|
||||
this.field.form = this.formID;
|
||||
this.field.field_choice = this.field_choice;
|
||||
createrffield(this.field).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
|
|
|||
|
|
@ -30,15 +30,10 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品状态">
|
||||
<template slot-scope="scope">{{
|
||||
actstate_[scope.row.act_state]
|
||||
}}
|
||||
</template>
|
||||
<template slot-scope="scope">{{actstate_[scope.row.act_state]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产状态">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.step_.name}}
|
||||
</template>
|
||||
<template slot-scope="scope">{{scope.row.step_.name}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后检验结果">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -58,7 +53,6 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleoption(scope)"
|
||||
>生成流程卡
|
||||
|
|
|
|||
|
|
@ -1,100 +1,95 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>生产任务列表</span>
|
||||
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
<div slot="header" class="clearfix">
|
||||
<span>生产任务列表</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="subproductionplanList.results"
|
||||
fit
|
||||
style="width: 100%"
|
||||
height="100"
|
||||
stripe
|
||||
border
|
||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
stripe
|
||||
border
|
||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="子计划编号" width="100px">
|
||||
<template slot-scope="scope">{{scope.row.number}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" width="180px" >
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="子计划编号" width="100px">
|
||||
<template slot-scope="scope">{{scope.row.number}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" width="180px">
|
||||
<template slot-scope="scope" v-if="scope.row.product_">{{ scope.row.product_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" >
|
||||
<el-table-column label="产品型号">
|
||||
<template slot-scope="scope" v-if="scope.row.product_">{{ scope.row.product_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" width="160px">
|
||||
<template slot-scope="scope" v-if="scope.row.subproduction_">{{ scope.row.subproduction_.name }}</template>
|
||||
<el-table-column label="名称" width="160px">
|
||||
<template slot-scope="scope" v-if="scope.row.subproduction_">{{ scope.row.subproduction_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="工序名" >
|
||||
<template slot-scope="scope" v-if="scope.row.process_" >{{ scope.row.process_.name }}</template>
|
||||
<el-table-column label="工序名">
|
||||
<template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序编号">
|
||||
<template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.number }}</template>
|
||||
<el-table-column label="工序编号">
|
||||
<template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="子工序" width="200">
|
||||
<template slot-scope="scope" v-if="scope.row.steps">
|
||||
<el-table-column label="子工序" width="200">
|
||||
<template slot-scope="scope" v-if="scope.row.steps">
|
||||
<el-tag v-for="item in scope.row.steps"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
|
||||
|
||||
:value="item.number"
|
||||
>
|
||||
{{item.name}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产车间" width="100px">
|
||||
<template slot-scope="scope" v-if="scope.row.workshop_">{{ scope.row.workshop_.name }}</template>
|
||||
<el-table-column label="生产车间" width="100px">
|
||||
<template slot-scope="scope" v-if="scope.row.workshop_">{{ scope.row.workshop_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产数量">
|
||||
<el-table-column label="生产数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开工时间" width="100px">
|
||||
<el-table-column label="开工时间" width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完工时间" width="100px">
|
||||
<el-table-column label="完工时间" width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下达状态">
|
||||
<el-table-column label="下达状态">
|
||||
<template slot-scope="scope">{{ state_[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="创建时间" width="160px">
|
||||
<el-table-column label="创建时间" width="160px">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="100px"
|
||||
fixed="right"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary"
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleclick(scope)"
|
||||
>修改日期</el-link
|
||||
>
|
||||
<el-link type="primary"
|
||||
v-if="scope.row.state==10"
|
||||
修改日期
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleissuedclick(scope)"
|
||||
>下达</el-link
|
||||
>
|
||||
|
||||
<el-link type="primary"
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
下达
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleselectclick(scope)"
|
||||
>查看详情</el-link
|
||||
>
|
||||
|
||||
查看详情
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
<pagination
|
||||
v-show="subproductionplanList.count > 0"
|
||||
:total="subproductionplanList.count"
|
||||
:page.sync="listQuery.page"
|
||||
|
|
@ -124,7 +119,7 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="子计划完工时间" prop="end_date">
|
||||
<el-date-picker
|
||||
<el-date-picker
|
||||
v-model="subproductionplan.end_date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
|
|
@ -133,223 +128,204 @@
|
|||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisibles"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
|
||||
<el-table
|
||||
<el-table
|
||||
:data="xhwl"
|
||||
border
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="预计消耗">
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="预计消耗">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际消耗">
|
||||
<el-table-column label="实际消耗">
|
||||
<template slot-scope="scope">{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产计划编号">
|
||||
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</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="物料编号">
|
||||
<el-table-column label="物料编号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号">
|
||||
<el-table-column label="物料型号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-table
|
||||
<el-table
|
||||
:data="ccwl"
|
||||
border
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="预计产出">
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="预计产出">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际产出">
|
||||
<el-table-column label="实际产出">
|
||||
<template slot-scope="scope">{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产计划编号">
|
||||
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</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="物料编号">
|
||||
<el-table-column label="物料编号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号">
|
||||
<el-table-column label="物料型号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibles = false">取消</el-button>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getsubproductionplanList,updatesubproductionplan,getProgress,issuesubplan } from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
<script>
|
||||
import {getsubproductionplanList, updatesubproductionplan, getProgress, issuesubplan} from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultesubproductionplan = {
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
subproductionplan: defaultesubproductionplan,
|
||||
subproductionplanList: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
|
||||
xhwl:[],
|
||||
ccwl:[],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogVisibles: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
||||
},
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成'}
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id=this.$route.params.id;
|
||||
this.getspList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//订单列表
|
||||
getspList() {
|
||||
this.listLoading = true;
|
||||
this.listQuery.production_plan = this.id;
|
||||
console.log(this.listQuery)
|
||||
getsubproductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.subproductionplanList = response.data;
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultesubproductionplan = {};
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
|
||||
subproductionplan: defaultesubproductionplan,
|
||||
subproductionplanList: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
|
||||
xhwl: [],
|
||||
ccwl: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogVisibles: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
state_: {
|
||||
10: '制定中',
|
||||
20: '已下达',
|
||||
30: '已接受',
|
||||
40: '生产中',
|
||||
50: '已完成'
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
};
|
||||
},
|
||||
handleclick(scope)
|
||||
{
|
||||
this.subproductionplan = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogVisible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getspList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//订单列表
|
||||
getspList() {
|
||||
this.listLoading = true;
|
||||
this.listQuery.production_plan = this.id;
|
||||
console.log(this.listQuery)
|
||||
getsubproductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.subproductionplanList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleclick(scope) {
|
||||
this.subproductionplan = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogVisible = true;
|
||||
|
||||
handleselectclick(scope)
|
||||
{
|
||||
this.dialogVisibles = true;
|
||||
this.xhwl=[];
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
|
||||
this.ccwl=[];
|
||||
getProgress(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
res.data.forEach((item) => {
|
||||
|
||||
if(item.type==1)
|
||||
{
|
||||
this.xhwl.push(item);
|
||||
}
|
||||
else if(item.type==2)
|
||||
{
|
||||
this.ccwl.push(item);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
handleselectclick(scope) {
|
||||
this.dialogVisibles = true;
|
||||
this.xhwl = [];
|
||||
|
||||
this.ccwl = [];
|
||||
getProgress(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
res.data.forEach((item) => {
|
||||
|
||||
if (item.type == 1) {
|
||||
this.xhwl.push(item);
|
||||
} else if (item.type == 2) {
|
||||
this.ccwl.push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm()
|
||||
{
|
||||
updatesubproductionplan(this.subproductionplan.id,this.subproductionplan).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getspList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleissuedclick(scope)
|
||||
{
|
||||
this.$confirm("确定下达子计划?", "提醒", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await issuesubplan(scope.row.id).then((res) => {
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
confirm() {
|
||||
updatesubproductionplan(this.subproductionplan.id, this.subproductionplan).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getspList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleissuedclick(scope) {
|
||||
this.$confirm("确定下达子计划?", "提醒", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
await issuesubplan(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getspList();
|
||||
this.$message.success("子计划已下达!");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@
|
|||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增采购订单项</el-button
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleCreate"
|
||||
>
|
||||
新增采购订单项
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
|
|
@ -19,32 +23,30 @@
|
|||
height="100"
|
||||
v-el-height-adaptive-table="{ bottomOffset: 43 }"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名称">
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号">
|
||||
<el-table-column label="物料型号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="采购数量">
|
||||
<el-table-column label="采购数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量">
|
||||
<el-table-column label="已到货数量">
|
||||
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="截止到货时间">
|
||||
<el-table-column label="截止到货时间">
|
||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['vendor_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -65,10 +67,10 @@
|
|||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="所需数量" prop="number">
|
||||
<el-input v-model="puorderTtem.count" placeholder="所需数量" />
|
||||
<el-input v-model="puorderTtem.count" placeholder="所需数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止到货时间" prop="delivery_date">
|
||||
<el-date-picker
|
||||
<el-form-item label="截止到货时间" prop="delivery_date">
|
||||
<el-date-picker
|
||||
v-model="puorderTtem.delivery_date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
|
|
@ -97,101 +99,101 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getpVendorList } from "@/api/vendor";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import {getpVendorList} from "@/api/vendor";
|
||||
import {getMaterialList} from "@/api/mtm";
|
||||
|
||||
import {
|
||||
getPuorderItemList,
|
||||
createPuorderItem,
|
||||
deletePuorderItem,
|
||||
} from "@/api/pum";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {
|
||||
getPuorderItemList,
|
||||
createPuorderItem,
|
||||
deletePuorderItem,
|
||||
} from "@/api/pum";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultpuorderItem = {
|
||||
pu_order:null,
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
puorderTtem: defaultpuorderItem,
|
||||
puorderTtemList: {
|
||||
count: 0,
|
||||
},
|
||||
materialoptions: [],
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
dialogVisible:false,
|
||||
rule1: {
|
||||
delivery_date: [{ required: true, message: "请选择日期", trigger: "blur" }],
|
||||
material: [
|
||||
{ required: true, message: "请选择物料", trigger: "change" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.getmaterialList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//采购订单列表
|
||||
getList() {
|
||||
this.listQuery.pu_order= this.id;
|
||||
getPuorderItemList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.puorderTtemList = response.data;
|
||||
}
|
||||
});
|
||||
import {genTree} from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultpuorderItem = {
|
||||
pu_order: null,
|
||||
};
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
puorderTtem: defaultpuorderItem,
|
||||
puorderTtemList: {
|
||||
count: 0,
|
||||
},
|
||||
materialoptions: [],
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
dialogVisible: false,
|
||||
rule1: {
|
||||
delivery_date: [{required: true, message: "请选择日期", trigger: "blur"}],
|
||||
material: [
|
||||
{required: true, message: "请选择物料", trigger: "change"},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
//物料
|
||||
getmaterialList() {
|
||||
getMaterialList({ page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.materialoptions = response.data;
|
||||
}
|
||||
});
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.getmaterialList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.puorderTtem = Object.assign({}, defaultpuorderItem);
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
async confirm() {
|
||||
this.puorderTtem.pu_order=this.id
|
||||
createPuorderItem(this.puorderTtem).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deletePuorderItem(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
methods: {
|
||||
checkPermission,
|
||||
//采购订单列表
|
||||
getList() {
|
||||
this.listQuery.pu_order = this.id;
|
||||
getPuorderItemList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.puorderTtemList = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
//物料
|
||||
getmaterialList() {
|
||||
getMaterialList({page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.materialoptions = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCreate() {
|
||||
this.puorderTtem = Object.assign({}, defaultpuorderItem);
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
async confirm() {
|
||||
this.puorderTtem.pu_order = this.id
|
||||
createPuorderItem(this.puorderTtem).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deletePuorderItem(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleoption(scope)"
|
||||
>查看
|
||||
|
|
@ -137,7 +136,6 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleprocess(scope)"
|
||||
>查看
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="基本信息" :column="8" :size="size" border>
|
||||
<el-descriptions-item label="合同名称" > {{contractdetail.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号" > {{contractdetail.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="金额" > {{contractdetail.amount}}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户名称" v-if="contractdetail.customer"> {{contractdetail.customer_.name}} </el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>关联订单</span>
|
||||
</div>
|
||||
<el-table
|
||||
<el-descriptions-item label="合同名称"> {{contractdetail.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号"> {{contractdetail.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="金额"> {{contractdetail.amount}}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户名称" v-if="contractdetail.customer"> {{contractdetail.customer_.name}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>关联订单</span>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="OrderList"
|
||||
border
|
||||
|
|
@ -21,110 +21,102 @@
|
|||
stripe
|
||||
highlight-current-row
|
||||
height="510px"
|
||||
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="订单编号" width="160" show-overflow-tooltip>
|
||||
<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>
|
||||
<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>
|
||||
<el-table-column label="产品名称" width="200" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" width="120" show-overflow-tooltip>
|
||||
<el-table-column label="产品型号" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品数量" >
|
||||
<el-table-column label="产品数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货日期" >
|
||||
<el-table-column label="交货日期">
|
||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已交货数量" >
|
||||
<el-table-column label="已交货数量">
|
||||
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间" width="160" >
|
||||
<el-table-column label="创建时间" width="160">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="primary"
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="handleDetail(scope)"
|
||||
>详情</el-link
|
||||
>
|
||||
|
||||
|
||||
详情
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getContract,getOrderList} from "@/api/sam";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {getContract, getOrderList} from "@/api/sam";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import {genTree} from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
contractdetail:"",
|
||||
OrderList:"",
|
||||
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getdetail();
|
||||
this.getList();
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
|
||||
contractdetail: "",
|
||||
OrderList: "",
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getList() {
|
||||
getOrderList({contract:this.id,page:0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.OrderList = response.data;
|
||||
}
|
||||
|
||||
})
|
||||
};
|
||||
},
|
||||
//详情
|
||||
getdetail() {
|
||||
|
||||
getContract(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.contractdetail = response.data;
|
||||
}
|
||||
|
||||
})
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getdetail();
|
||||
this.getList();
|
||||
|
||||
|
||||
},
|
||||
|
||||
//订单详情
|
||||
handleDetail(scope){
|
||||
this.$router.push({name: "orderdetail", params: { id: scope.row.id }, })
|
||||
}
|
||||
},
|
||||
};
|
||||
methods: {
|
||||
checkPermission,
|
||||
getList() {
|
||||
getOrderList({contract: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.OrderList = response.data;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
//详情
|
||||
getdetail() {
|
||||
|
||||
getContract(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.contractdetail = response.data;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//订单详情
|
||||
handleDetail(scope) {
|
||||
this.$router.push({name: "orderdetail", params: {id: scope.row.id},})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -3,30 +3,30 @@
|
|||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="基本信息" direction="vertical" :column="6" border>
|
||||
<el-descriptions-item label="客户名称" v-if="salesdetail.customer">
|
||||
{{ salesdetail.customer_.name }}</el-descriptions-item
|
||||
>
|
||||
{{ salesdetail.customer_.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称" v-if="salesdetail.product">
|
||||
{{ salesdetail.product_.name }}</el-descriptions-item
|
||||
>
|
||||
{{ salesdetail.product_.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="salesdetail.product"
|
||||
label="产品型号"
|
||||
:span="2"
|
||||
v-if="salesdetail.product"
|
||||
>
|
||||
{{ salesdetail.product_.specification }}</el-descriptions-item
|
||||
>
|
||||
|
||||
{{ salesdetail.product_.specification }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同名称" v-if="salesdetail.order">
|
||||
{{ salesdetail.order_.contract_.name }}</el-descriptions-item
|
||||
>
|
||||
{{ salesdetail.order_.contract_.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合同编号" v-if="salesdetail.order">
|
||||
{{ salesdetail.order_.contract_.number }}</el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="订单编号" v-if="salesdetail.order">
|
||||
{{ salesdetail.order_.contract_.number }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="订单编号" v-if="salesdetail.order">
|
||||
{{ salesdetail.order_.number }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="物流详情" v-if="ship_pic!=''">
|
||||
<el-link type="primary" :href="salesdetail.ship_pic">物流单</el-link></el-descriptions-item>
|
||||
<el-descriptions-item v-if="ship_pic!=''" label="物流详情">
|
||||
<el-link type="primary" :href="salesdetail.ship_pic">物流单</el-link>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-button type="primary" style="margin-top:10px" @click="upload">上传物流信息</el-button>
|
||||
</el-card>
|
||||
|
|
@ -40,38 +40,36 @@
|
|||
highlight-current-row
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="产品编号" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.iproduct_.material_.name
|
||||
}}</template>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.iproduct_.material_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.iproduct_.batch
|
||||
}}</template>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.iproduct_.batch }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.iproduct_.warehouse_.name
|
||||
}}</template>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.iproduct_.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-tag v-else>已军检</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>
|
||||
<el-tag v-else>合格</el-tag></template
|
||||
>
|
||||
<el-tag v-else>合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="装箱单号" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.packnum }}</template>
|
||||
|
|
@ -82,60 +80,59 @@
|
|||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="primary"
|
||||
@click="handlePack(scope)"
|
||||
>装箱</el-link
|
||||
>
|
||||
|
||||
装箱
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="primary"
|
||||
@click="handleNotPack(scope)"
|
||||
>备注</el-link
|
||||
>
|
||||
备注
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisibless"
|
||||
title="上传物流文件"
|
||||
>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="ship"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisibless"
|
||||
title="上传物流文件"
|
||||
>
|
||||
<el-form-item label="文件" prop="template" >
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:action="upUrl"
|
||||
:on-preview="handlePreview"
|
||||
:on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:headers="upHeaders"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
accept=".webp,.bmp,.jpg,.png,.tif,.gif,.apng"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibless = false">取消</el-button>
|
||||
<el-button type="primary" @click="uploadship">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-form
|
||||
ref="Forms"
|
||||
:model="ship"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="文件" prop="template">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:action="upUrl"
|
||||
:on-preview="handlePreview"
|
||||
:on-success="handleUpSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:headers="upHeaders"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
accept=".webp,.bmp,.jpg,.png,.tif,.gif,.apng"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibless = false">取消</el-button>
|
||||
<el-button type="primary" @click="uploadship">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
|
|
@ -149,9 +146,8 @@
|
|||
label-position="right"
|
||||
>
|
||||
<el-form-item label="装箱单号" prop="packnum">
|
||||
<el-input v-model="packData.packnum" placeholder="装箱单号" />
|
||||
<el-input v-model="packData.packnum" placeholder="装箱单号"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="装箱文件确认" prop="iproducts">
|
||||
<el-table
|
||||
:data="packlist"
|
||||
|
|
@ -162,7 +158,7 @@
|
|||
ref="multipleTable"
|
||||
height="300"
|
||||
>
|
||||
<el-table-column type="index" width="50" label="序号" />
|
||||
<el-table-column type="index" width="50" label="序号"/>
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
|
@ -183,22 +179,22 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{
|
||||
scope.row.material_.count
|
||||
}}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.material_">
|
||||
{{scope.row.material_.count}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存数量">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{
|
||||
scope.row.material_.count_safe
|
||||
}}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.material_">
|
||||
{{scope.row.material_.count_safe}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="danger" @click="dialogVisible = false">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="submitPack">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -215,13 +211,13 @@
|
|||
label-position="right"
|
||||
>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="notpackData.remark" placeholder="未装箱备注" />
|
||||
<el-input v-model="notpackData.remark" placeholder="未装箱备注"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisibles = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="danger" @click="dialogVisibles = false">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="submitnotPack">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -229,63 +225,63 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getSale,
|
||||
getSaleproductList,
|
||||
deleteSaleproduct,
|
||||
gePack,
|
||||
subPack,
|
||||
notPackremark,
|
||||
ship
|
||||
} from "@/api/sam";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultepackData = {
|
||||
packnum: "",
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
salesdetail: "",
|
||||
saleproduct: "",
|
||||
packlist: [],
|
||||
upHeaders: upHeaders(),
|
||||
import {
|
||||
getSale,
|
||||
getSaleproductList,
|
||||
deleteSaleproduct,
|
||||
gePack,
|
||||
subPack,
|
||||
notPackremark,
|
||||
ship
|
||||
} from "@/api/sam";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {upUrl, upHeaders} from "@/api/file";
|
||||
import {genTree} from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultepackData = {
|
||||
packnum: "",
|
||||
};
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
salesdetail: "",
|
||||
saleproduct: "",
|
||||
packlist: [],
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
dialogVisible: false,
|
||||
dialogVisibles: false,
|
||||
dialogVisibless: false,
|
||||
ship:{},
|
||||
packData: defaultepackData,
|
||||
notpackData: { remark: "" },
|
||||
detail: [],
|
||||
fileList:[],
|
||||
saleproductId: null,
|
||||
saleProductid: null,
|
||||
dialogType: "new",
|
||||
};
|
||||
},
|
||||
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.getSaleproductLists();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//详情
|
||||
getList() {
|
||||
getSale(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.salesdetail = response.data;
|
||||
}
|
||||
});
|
||||
dialogVisible: false,
|
||||
dialogVisibles: false,
|
||||
dialogVisibless: false,
|
||||
ship: {},
|
||||
packData: defaultepackData,
|
||||
notpackData: {remark: ""},
|
||||
detail: [],
|
||||
fileList: [],
|
||||
saleproductId: null,
|
||||
saleProductid: null,
|
||||
dialogType: "new",
|
||||
};
|
||||
},
|
||||
//上传物流文件
|
||||
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.getSaleproductLists();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//详情
|
||||
getList() {
|
||||
getSale(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.salesdetail = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
//上传物流文件
|
||||
handlePreview(file) {
|
||||
if ("url" in file) {
|
||||
window.open(file.url);
|
||||
|
|
@ -295,95 +291,94 @@ export default {
|
|||
},
|
||||
handleUpSuccess(res, file, filelist) {
|
||||
this.ship.path = res.data.path;
|
||||
this.salesdetail.ship_pic=res.data.path;
|
||||
this.salesdetail.ship_pic = res.data.path;
|
||||
console.log(this.ship.path)
|
||||
},
|
||||
handleRemove(file, filelist){
|
||||
handleRemove(file, filelist) {
|
||||
this.ship.path = null;
|
||||
},
|
||||
upload() {
|
||||
upload() {
|
||||
|
||||
this.dialogVisibless=true;
|
||||
this.dialogVisibless = true;
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
uploadship()
|
||||
{
|
||||
console.log(this.ship);
|
||||
ship(this.id, this.ship).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
this.dialogVisibless = false;
|
||||
this.$message.success("物流文件上传成功!");
|
||||
}
|
||||
});
|
||||
},
|
||||
uploadship() {
|
||||
console.log(this.ship);
|
||||
ship(this.id, this.ship).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
|
||||
getSaleproductLists() {
|
||||
getSaleproductList({ sale: this.id, page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.saleproduct = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteSaleproduct(scope.row.id);
|
||||
this.getSaleproductLists();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
this.dialogVisibless = false;
|
||||
this.$message.success("物流文件上传成功!");
|
||||
}
|
||||
});
|
||||
},
|
||||
//装箱操作
|
||||
handlePack(scope) {
|
||||
this.packData = Object.assign({}, scope.row);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
gePack(scope.row.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.packlist = response.data.detail;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
this.saleproductId = scope.row.id;
|
||||
},
|
||||
|
||||
submitPack() {
|
||||
this.packData.detail = this.packlist;
|
||||
console.log(this.packData);
|
||||
subPack(this.saleproductId, this.packData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getSaleproductLists();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
getSaleproductLists() {
|
||||
getSaleproductList({sale: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.saleproduct = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteSaleproduct(scope.row.id);
|
||||
this.getSaleproductLists();
|
||||
this.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
//装箱操作
|
||||
handlePack(scope) {
|
||||
this.packData = Object.assign({}, scope.row);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
gePack(scope.row.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.packlist = response.data.detail;
|
||||
}
|
||||
});
|
||||
|
||||
this.saleproductId = scope.row.id;
|
||||
},
|
||||
|
||||
submitPack() {
|
||||
this.packData.detail = this.packlist;
|
||||
console.log(this.packData);
|
||||
subPack(this.saleproductId, this.packData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getSaleproductLists();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
//未装箱备注
|
||||
handleNotPack(scope) {
|
||||
this.dialogVisibles = true;
|
||||
this.saleProductid = scope.row.id;
|
||||
},
|
||||
submitnotPack() {
|
||||
notPackremark(this.saleProductid, this.notpackData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getSaleproductLists();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
//未装箱备注
|
||||
handleNotPack(scope) {
|
||||
this.dialogVisibles = true;
|
||||
this.saleProductid = scope.row.id;
|
||||
},
|
||||
submitnotPack() {
|
||||
notPackremark(this.saleProductid, this.notpackData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getSaleproductLists();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue