buttonControl

This commit is contained in:
shijing 2022-04-26 15:08:16 +08:00
parent 5aa0fed51b
commit 01d41a5bf0
7 changed files with 724 additions and 755 deletions

View File

@ -7,7 +7,8 @@
">子工序列表</span> ">子工序列表</span>
</div> </div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreateStep" <el-button type="primary" icon="el-icon-plus" @click="handleCreateStep"
>新增子工序</el-button> >新增子工序
</el-button>
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="stepList" :data="stepList"
@ -27,18 +28,19 @@
</el-table-column> </el-table-column>
<el-table-column label="相关设备"> <el-table-column label="相关设备">
<template slot-scope="scope" v-if="scope.row.equipments"> <template slot-scope="scope" v-if="scope.row.equipments">
<el-tag v-for="item in scope.row.equipments_" <el-tag
v-for="item in scope.row.equipments_"
:key="item.number" :key="item.number"
:label="item.name" :label="item.name"
:value="item.number">{{item.name}}</el-tag> :value="item.number"
>
{{item.name}}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="子工序类型"> <el-table-column label="子工序类型">
<template slot-scope="scope">{{ type_[scope.row.type] }}</template> <template slot-scope="scope">{{ type_[scope.row.type] }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="操作" label="操作"
@ -46,17 +48,17 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['step_update'])"
type="primary" type="primary"
@click="handleEditStep(scope)" @click="handleEditStep(scope)"
>编辑</el-link
> >
编辑
</el-link>
<el-link <el-link
v-if="checkPermission(['step_delete'])"
type="danger" type="danger"
@click="handleDeleteStep(scope)" @click="handleDeleteStep(scope)"
>删除</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -79,34 +81,30 @@
<el-input v-model="step.number" placeholder="工序编号"/> <el-input v-model="step.number" placeholder="工序编号"/>
</el-form-item> </el-form-item>
<el-form-item label="工序设备" prop="equipments"> <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 <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="指导书内容" prop="instruction_content"> <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>
<el-form-item label="子工序类型" prop="type"> <el-form-item label="子工序类型" prop="type">
<el-select style="width: 100%" v-model="step.type" placeholder="请选择"> <el-select style="width: 100%" v-model="step.type" placeholder="请选择">
<el-option <el-option
v-for="item in typeoption" v-for="item in typeoption"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisibles = false">取消</el-button> <el-button type="danger" @click="dialogVisibles = false">取消</el-button>
@ -124,7 +122,8 @@
">过程记录表</span> ">过程记录表</span>
</div> </div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button> >新增
</el-button>
<el-table <el-table
:data="recordformList.results" :data="recordformList.results"
border border
@ -157,17 +156,20 @@
v-if="checkPermission(['material_update'])" v-if="checkPermission(['material_update'])"
type="primary" type="primary"
@click="handleLook(scope)" @click="handleLook(scope)"
>查看</el-link> >查看
</el-link>
<el-link <el-link
v-if="checkPermission(['material_update'])" v-if="checkPermission(['material_update'])"
type="primary" type="primary"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑</el-link> >编辑
</el-link>
<el-link <el-link
v-if="checkPermission(['material_delete'])" v-if="checkPermission(['material_delete'])"
type="danger" type="danger"
@click="handleDelete(scope)" @click="handleDelete(scope)"
>删除</el-link> >删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -206,7 +208,6 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button> <el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -289,7 +290,8 @@
">记录字段</span> ">记录字段</span>
</div> </div>
<el-button type="primary" icon="el-icon-plus" @click="handlefieldCreate" <el-button type="primary" icon="el-icon-plus" @click="handlefieldCreate"
>新增</el-button> >新增
</el-button>
<el-table <el-table
:data="fieldList.results" :data="fieldList.results"
@ -331,13 +333,15 @@
v-if="checkPermission(['material_update'])" v-if="checkPermission(['material_update'])"
type="primary" type="primary"
@click="handlefieldEdit(scope)" @click="handlefieldEdit(scope)"
>编辑</el-link >编辑
</el-link
> >
<el-link <el-link
v-if="checkPermission(['material_delete'])" v-if="checkPermission(['material_delete'])"
type="danger" type="danger"
@click="handlefieldDelete(scope)" @click="handlefieldDelete(scope)"
>删除</el-link >删除
</el-link
> >
</template> </template>
</el-table-column> </el-table-column>
@ -350,7 +354,8 @@
:limit.sync="listQueryfield.page_size" :limit.sync="listQueryfield.page_size"
@pagination="fieldLists" @pagination="fieldLists"
/> />
<el-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false" :title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'"> <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 ref="Form" :model="field" label-width="80px" label-position="right">
<el-form-item label="字段类型" prop="field_type"> <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="请选择">
@ -363,12 +368,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="字段标识" prop="field_key"> <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>
<el-form-item label="字段名称" prop="field_name"> <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>
<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;"> <el-button @click.prevent="addDomain" style="border: none;">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
<span style="font-size:14px;">添加</span> <span style="font-size:14px;">添加</span>
@ -378,7 +386,8 @@
<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>
<el-col :span="3" style="text-align: center" v-if="$index!==0"> <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-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
@ -403,8 +412,17 @@
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getEquipmentAll} from "@/api/equipment"; import {getEquipmentAll} from "@/api/equipment";
import {upUrl, upHeaders} from "@/api/file"; import {upUrl, upHeaders} from "@/api/file";
import { getStep,getrecordformList,createrecordform,updaterecordform,deleterecordform,getrffieldList,createrffield,updaterffield, import {
deleterffield} from "@/api/mtm"; getStep,
getrecordformList,
createrecordform,
updaterecordform,
deleterecordform,
getrffieldList,
createrffield,
updaterffield,
deleterffield
} from "@/api/mtm";
import vueJsonEditor from 'vue-json-editor' 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 import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -417,9 +435,7 @@
const defaultrecordform = { const defaultrecordform = {
enabled: true enabled: true
}; };
const defaultfield = { const defaultfield = {};
};
export default { export default {
components: {Pagination, vueJsonEditor}, components: {Pagination, vueJsonEditor},
data() { data() {
@ -596,8 +612,6 @@
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.getList(); this.getList();
@ -682,8 +696,7 @@
this.fieldLists(); this.fieldLists();
}, },
recordformLists() recordformLists() {
{
this.listQueryrecordform.step = this.stepid; this.listQueryrecordform.step = this.stepid;
this.listQueryrecordform.type = 10; this.listQueryrecordform.type = 10;
getrecordformList(this.listQueryrecordform).then((response) => { getrecordformList(this.listQueryrecordform).then((response) => {
@ -693,8 +706,7 @@
}); });
}, },
fieldLists() fieldLists() {
{
this.listQueryfield.form = this.formID this.listQueryfield.form = this.formID
getrffieldList(this.listQueryfield).then((response) => { getrffieldList(this.listQueryfield).then((response) => {
if (response.data) { if (response.data) {

View File

@ -30,15 +30,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="产品状态"> <el-table-column label="产品状态">
<template slot-scope="scope">{{ <template slot-scope="scope">{{actstate_[scope.row.act_state]}}</template>
actstate_[scope.row.act_state]
}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="生产状态"> <el-table-column label="生产状态">
<template slot-scope="scope"> <template slot-scope="scope">{{scope.row.step_.name}}</template>
{{scope.row.step_.name}}
</template>
</el-table-column> </el-table-column>
<el-table-column label="最后检验结果"> <el-table-column label="最后检验结果">
<template slot-scope="scope"> <template slot-scope="scope">
@ -58,7 +53,6 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleoption(scope)" @click="handleoption(scope)"
>生成流程卡 >生成流程卡

View File

@ -3,9 +3,7 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>生产任务列表</span> <span>生产任务列表</span>
</div> </div>
<el-table <el-table
:data="subproductionplanList.results" :data="subproductionplanList.results"
fit fit
@ -16,7 +14,6 @@
v-el-height-adaptive-table="{bottomOffset: 50}" v-el-height-adaptive-table="{bottomOffset: 50}"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="子计划编号" width="100px"> <el-table-column label="子计划编号" width="100px">
<template slot-scope="scope">{{scope.row.number}}</template> <template slot-scope="scope">{{scope.row.number}}</template>
</el-table-column> </el-table-column>
@ -29,8 +26,6 @@
<el-table-column label="名称" width="160px"> <el-table-column label="名称" width="160px">
<template slot-scope="scope" v-if="scope.row.subproduction_">{{ scope.row.subproduction_.name }}</template> <template slot-scope="scope" v-if="scope.row.subproduction_">{{ scope.row.subproduction_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="工序名"> <el-table-column label="工序名">
<template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.name }}</template> <template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.name }}</template>
</el-table-column> </el-table-column>
@ -42,9 +37,10 @@
<el-tag v-for="item in scope.row.steps" <el-tag v-for="item in scope.row.steps"
:key="item.number" :key="item.number"
:label="item.name" :label="item.name"
:value="item.number">{{item.name}}</el-tag> :value="item.number"
>
{{item.name}}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产车间" width="100px"> <el-table-column label="生产车间" width="100px">
@ -62,8 +58,6 @@
<el-table-column label="下达状态"> <el-table-column label="下达状态">
<template slot-scope="scope">{{ state_[scope.row.state] }}</template> <template slot-scope="scope">{{ state_[scope.row.state] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="160px"> <el-table-column label="创建时间" width="160px">
<template slot-scope="scope">{{ scope.row.create_time }}</template> <template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column> </el-table-column>
@ -74,23 +68,24 @@
fixed="right" fixed="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" <el-link
v-if="checkPermission(['warehouse_update'])" type="primary"
@click="handleclick(scope)" @click="handleclick(scope)"
>修改日期</el-link
> >
<el-link type="primary" 修改日期
v-if="scope.row.state==10" </el-link>
<el-link
type="primary"
@click="handleissuedclick(scope)" @click="handleissuedclick(scope)"
>下达</el-link
> >
下达
<el-link type="primary" </el-link>
v-if="checkPermission(['warehouse_update'])" <el-link
type="primary"
@click="handleselectclick(scope)" @click="handleselectclick(scope)"
>查看详情</el-link
> >
查看详情
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -133,8 +128,6 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button> <el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -145,7 +138,6 @@
:visible.sync="dialogVisibles" :visible.sync="dialogVisibles"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-table <el-table
:data="xhwl" :data="xhwl"
border border
@ -155,9 +147,6 @@
max-height="400" max-height="400"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="预计消耗"> <el-table-column label="预计消耗">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
@ -179,7 +168,6 @@
<el-table-column label="物料单位"> <el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template> <template slot-scope="scope">{{ scope.row.material_.unit }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table <el-table
:data="ccwl" :data="ccwl"
@ -190,9 +178,6 @@
max-height="400" max-height="400"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="预计产出"> <el-table-column label="预计产出">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
@ -214,11 +199,9 @@
<el-table-column label="物料单位"> <el-table-column label="物料单位">
<template slot-scope="scope">{{ scope.row.material_.unit }}</template> <template slot-scope="scope">{{ scope.row.material_.unit }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisibles = false">取消</el-button> <el-button type="danger" @click="dialogVisibles = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -229,8 +212,7 @@ import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultesubproductionplan = { const defaultesubproductionplan = {};
};
export default { export default {
components: {Pagination}, components: {Pagination},
data() { data() {
@ -260,7 +242,8 @@ export default {
20: '已下达', 20: '已下达',
30: '已接受', 30: '已接受',
40: '生产中', 40: '生产中',
50:'已完成'} 50: '已完成'
}
}; };
}, },
computed: {}, computed: {},
@ -283,8 +266,7 @@ export default {
this.listLoading = false; this.listLoading = false;
}); });
}, },
handleclick(scope) handleclick(scope) {
{
this.subproductionplan = Object.assign({}, scope.row); // copy obj this.subproductionplan = Object.assign({}, scope.row); // copy obj
this.dialogVisible = true; this.dialogVisible = true;
@ -294,8 +276,7 @@ export default {
}, },
handleselectclick(scope) handleselectclick(scope) {
{
this.dialogVisibles = true; this.dialogVisibles = true;
this.xhwl = []; this.xhwl = [];
@ -305,12 +286,9 @@ export default {
res.data.forEach((item) => { res.data.forEach((item) => {
if(item.type==1) if (item.type == 1) {
{
this.xhwl.push(item); this.xhwl.push(item);
} } else if (item.type == 2) {
else if(item.type==2)
{
this.ccwl.push(item); this.ccwl.push(item);
} }
@ -319,8 +297,7 @@ export default {
} }
}); });
}, },
confirm() confirm() {
{
updatesubproductionplan(this.subproductionplan.id, this.subproductionplan).then((res) => { updatesubproductionplan(this.subproductionplan.id, this.subproductionplan).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getspList(); this.getspList();
@ -330,8 +307,7 @@ export default {
}); });
}, },
handleissuedclick(scope) handleissuedclick(scope) {
{
this.$confirm("确定下达子计划?", "提醒", { this.$confirm("确定下达子计划?", "提醒", {
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "取消", cancelButtonText: "取消",

View File

@ -2,9 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div> <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> </div>
</el-card> </el-card>
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
@ -26,7 +30,6 @@
<el-table-column label="物料型号"> <el-table-column label="物料型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template> <template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column> </el-table-column>
<el-table-column label="采购数量"> <el-table-column label="采购数量">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
</el-table-column> </el-table-column>
@ -36,15 +39,14 @@
<el-table-column label="截止到货时间"> <el-table-column label="截止到货时间">
<template slot-scope="scope">{{ scope.row.delivery_date }}</template> <template slot-scope="scope">{{ scope.row.delivery_date }}</template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['vendor_delete'])"
type="danger" type="danger"
@click="handleDelete(scope)" @click="handleDelete(scope)"
>删除</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -99,7 +99,6 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleoption(scope)" @click="handleoption(scope)"
>查看 >查看
@ -137,7 +136,6 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleprocess(scope)" @click="handleprocess(scope)"
>查看 >查看

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-descriptions title="基本信息" :column="8" :size="size" border> <el-descriptions title="基本信息" :column="8" :size="size" border>
<el-descriptions-item label="合同名称"> {{contractdetail.name}}</el-descriptions-item> <el-descriptions-item label="合同名称"> {{contractdetail.name}}</el-descriptions-item>
<el-descriptions-item label="编号"> {{contractdetail.number}}</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="金额"> {{contractdetail.amount}}</el-descriptions-item>
<el-descriptions-item label="客户名称" v-if="contractdetail.customer"> {{contractdetail.customer_.name}} </el-descriptions-item> <el-descriptions-item label="客户名称" v-if="contractdetail.customer"> {{contractdetail.customer_.name}}
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card class="box-card"> <el-card class="box-card">
@ -21,17 +21,14 @@
stripe stripe
highlight-current-row highlight-current-row
height="510px" height="510px"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="订单编号" width="160" show-overflow-tooltip> <el-table-column label="订单编号" width="160" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column> </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> <template slot-scope="scope">{{ scope.row.customer_.name }}</template>
</el-table-column> </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> <template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column> </el-table-column>
@ -47,7 +44,6 @@
<el-table-column label="已交货数量"> <el-table-column label="已交货数量">
<template slot-scope="scope">{{ scope.row.delivered_count }}</template> <template slot-scope="scope">{{ scope.row.delivered_count }}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="160"> <el-table-column label="创建时间" width="160">
<template slot-scope="scope">{{ scope.row.create_time }}</template> <template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column> </el-table-column>
@ -57,16 +53,12 @@
width="220px" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['warehouse_delete'])"
type="primary" type="primary"
@click="handleDetail(scope)" @click="handleDetail(scope)"
>详情</el-link
> >
详情
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -3,30 +3,30 @@
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-descriptions title="基本信息" direction="vertical" :column="6" border> <el-descriptions title="基本信息" direction="vertical" :column="6" border>
<el-descriptions-item label="客户名称" v-if="salesdetail.customer"> <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"> <el-descriptions-item label="产品名称" v-if="salesdetail.product">
{{ salesdetail.product_.name }}</el-descriptions-item {{ salesdetail.product_.name }}
> </el-descriptions-item>
<el-descriptions-item <el-descriptions-item
v-if="salesdetail.product"
label="产品型号" label="产品型号"
:span="2" :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"> <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"> <el-descriptions-item label="合同编号" v-if="salesdetail.order">
{{ salesdetail.order_.contract_.number }}</el-descriptions-item {{ salesdetail.order_.contract_.number }}
> </el-descriptions-item>
<el-descriptions-item label="订单编号" v-if="salesdetail.order"> <el-descriptions-item label="订单编号" v-if="salesdetail.order">
{{ salesdetail.order_.number }} {{ salesdetail.order_.number }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="物流详情" v-if="ship_pic!=''"> <el-descriptions-item v-if="ship_pic!=''" label="物流详情">
<el-link type="primary" :href="salesdetail.ship_pic">物流单</el-link></el-descriptions-item> <el-link type="primary" :href="salesdetail.ship_pic">物流单</el-link>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-button type="primary" style="margin-top:10px" @click="upload">上传物流信息</el-button> <el-button type="primary" style="margin-top:10px" @click="upload">上传物流信息</el-button>
</el-card> </el-card>
@ -44,34 +44,32 @@
<el-table-column label="产品编号" show-overflow-tooltip> <el-table-column label="产品编号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" show-overflow-tooltip> <el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.iproduct_.material_.name {{scope.row.iproduct_.material_.name }}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次"> <el-table-column label="批次">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.iproduct_.batch {{scope.row.iproduct_.batch }}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库"> <el-table-column label="仓库">
<template slot-scope="scope">{{ <template slot-scope="scope">
scope.row.iproduct_.warehouse_.name {{scope.row.iproduct_.warehouse_.name }}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否已军检"> <el-table-column label="是否已军检">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_mtested == false">未军检</el-tag> <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>
<el-table-column label="军检"> <el-table-column label="军检">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.is_mtestok == false">不合格</el-tag> <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>
<el-table-column label="装箱单号" show-overflow-tooltip> <el-table-column label="装箱单号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.packnum }}</template> <template slot-scope="scope">{{ scope.row.packnum }}</template>
@ -82,24 +80,23 @@
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['warehouse_delete'])"
type="primary" type="primary"
@click="handlePack(scope)" @click="handlePack(scope)"
>装箱</el-link
> >
装箱
</el-link>
<el-link <el-link
v-if="checkPermission(['warehouse_delete'])"
type="primary" type="primary"
@click="handleNotPack(scope)" @click="handleNotPack(scope)"
>备注</el-link
> >
备注
</el-link>
<el-link <el-link
v-if="checkPermission(['warehouse_delete'])"
type="danger" type="danger"
@click="handleDelete(scope)" @click="handleDelete(scope)"
>删除</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -151,7 +148,6 @@
<el-form-item label="装箱单号" prop="packnum"> <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>
<el-form-item label="装箱文件确认" prop="iproducts"> <el-form-item label="装箱文件确认" prop="iproducts">
<el-table <el-table
:data="packlist" :data="packlist"
@ -183,22 +179,22 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存数量"> <el-table-column label="库存数量">
<template slot-scope="scope" v-if="scope.row.material_">{{ <template slot-scope="scope" v-if="scope.row.material_">
scope.row.material_.count {{scope.row.material_.count}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全库存数量"> <el-table-column label="安全库存数量">
<template slot-scope="scope" v-if="scope.row.material_">{{ <template slot-scope="scope" v-if="scope.row.material_">
scope.row.material_.count_safe {{scope.row.material_.count_safe}}
}}</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false" <el-button type="danger" @click="dialogVisible = false">
>取消</el-button 取消
> </el-button>
<el-button type="primary" @click="submitPack">确认</el-button> <el-button type="primary" @click="submitPack">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -219,9 +215,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisibles = false" <el-button type="danger" @click="dialogVisibles = false">
>取消</el-button 取消
> </el-button>
<el-button type="primary" @click="submitnotPack">确认</el-button> <el-button type="primary" @click="submitnotPack">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -307,8 +303,7 @@ export default {
}, },
uploadship() uploadship() {
{
console.log(this.ship); console.log(this.ship);
ship(this.id, this.ship).then((res) => { ship(this.id, this.ship).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {