2022-06-27 19:25:41 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!--工具栏-->
|
|
|
|
|
|
<div class="head-container">
|
|
|
|
|
|
<div v-if="crud.props.searchToggle">
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
class="demo-form-inline"
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
label-suffix=":"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label-width="80px"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="销售单号">
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.sale_code"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
class="filter-item"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="销售单号"
|
|
|
|
|
|
style="width: 200px;"
|
|
|
|
|
|
/>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="物料搜索">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="query.material"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
class="filter-item"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
clearable
|
|
|
|
|
|
placeholder="物料编码、名称或规格"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
size="small"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
style="width: 200px;"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="订单交期">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="query.planTime"
|
|
|
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
@change="crud.toQuery"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="创建时间">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="query.createTime"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
:default-time="['00:00:00', '23:59:59']"
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
start-placeholder="开始日期"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
type="daterange"
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
/>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-form-item label="单据类型">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.sale_type"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.PCS_SAL_TYPE"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="生成方式">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.create_mode"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.ST_CREATE_MODE"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="状态">
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="query.status"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
filterable
|
|
|
|
|
|
placeholder="请选择"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
style="width: 200px"
|
2022-06-27 19:25:41 +08:00
|
|
|
|
@change="crud.toQuery"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.PCS_SALE_STATUS"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<!-- <el-form-item label="产品系列">-->
|
|
|
|
|
|
<!-- <treeselect-->
|
|
|
|
|
|
<!-- v-model="query.product_series"-->
|
|
|
|
|
|
<!-- :auto-load-root-options="false"-->
|
|
|
|
|
|
<!-- :load-options="loadChildNodes"-->
|
|
|
|
|
|
<!-- :options="classes3"-->
|
|
|
|
|
|
<!-- placeholder="请选择"-->
|
|
|
|
|
|
<!-- style="width: 200px;"-->
|
|
|
|
|
|
<!-- />-->
|
|
|
|
|
|
<!-- </el-form-item>-->
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<rrOperation :crud="crud"/>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</el-form>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
icon="el-icon-position"
|
|
|
|
|
|
size="mini"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
type="success"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
@click="deleteApsData"
|
|
|
|
|
|
>
|
|
|
|
|
|
清空测试数据
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</div>
|
2023-03-24 16:57:57 +08:00
|
|
|
|
<crudOperation :permission="permission">
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
icon="el-icon-upload2"
|
|
|
|
|
|
size="mini"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
type="warning"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
@click="uploadShow = true"
|
|
|
|
|
|
>
|
|
|
|
|
|
导入
|
|
|
|
|
|
</el-button>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
|
|
|
|
|
|
<el-button
|
2023-03-24 16:57:57 +08:00
|
|
|
|
slot="right"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
icon="el-icon-position"
|
|
|
|
|
|
size="mini"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
type="success"
|
2023-03-24 16:57:57 +08:00
|
|
|
|
@click="importin"
|
|
|
|
|
|
>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
aps提交
|
|
|
|
|
|
</el-button>
|
2023-03-24 16:57:57 +08:00
|
|
|
|
</crudOperation>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
<!--表单组件-->
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
|
:before-close="crud.cancelCU"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
:close-on-click-modal="false"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
:title="crud.status.title"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
:visible.sync="crud.status.cu > 0"
|
2023-07-09 10:21:13 +08:00
|
|
|
|
width="1200px"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<el-form
|
|
|
|
|
|
ref="form"
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
:model="form"
|
|
|
|
|
|
label-width="160px"
|
|
|
|
|
|
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="车间" prop="product_area">
|
|
|
|
|
|
<!-- unit_list-->
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-select
|
|
|
|
|
|
v-model="form.product_area" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
|
|
|
|
|
placeholder=""
|
2023-09-18 13:26:48 +08:00
|
|
|
|
>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in dict.product_area"
|
|
|
|
|
|
:key="item.value"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="销售单号" prop="sale_code">
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="form.sale_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
|
|
|
|
|
style="width: 200px;"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
</el-form-item>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<el-form-item label="合同号" prop="contract_code">
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="form.contract_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
|
|
|
|
|
style="width: 200px;"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
</el-form-item>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<!-- <el-form-item label="计量单位" prop="unit_name">
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<el-select v-model="form.qty_unit_id" placeholder="">
|
2023-07-09 10:21:13 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in unit_list"
|
|
|
|
|
|
:key="item.value"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
</el-form-item> -->
|
2023-07-09 10:21:13 +08:00
|
|
|
|
<el-form-item label="物料编码" prop="material_code">
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="form.material_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
|
|
|
|
|
style="width: 200px;"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
</el-form-item>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<!-- <el-form-item label="客户名称" prop="cust_name">
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<el-select v-model="form.cust_code" placeholder="">
|
2023-07-09 10:21:13 +08:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in customer_list"
|
|
|
|
|
|
:key="item.label"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
</el-form-item> -->
|
|
|
|
|
|
<el-form-item label="计划交期时间" prop="plandeliver_date">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="form.plandeliverDate"
|
|
|
|
|
|
style="width: 200px;"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
type="date"
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<el-form-item label="订单数量" prop="sale_qty">
|
|
|
|
|
|
<el-input-number v-model="form.sale_qty" style="width: 200px;"/>
|
|
|
|
|
|
</el-form-item>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<el-input v-model="form.remark" style="width: 200px;"/>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
:loading="crud.cu === 2"
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="crud.submitCU"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
>确认
|
|
|
|
|
|
</el-button>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--表格渲染-->
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-table
|
|
|
|
|
|
ref="table"
|
|
|
|
|
|
v-loading="crud.loading"
|
|
|
|
|
|
:data="crud.data"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@selection-change="crud.selectionChangeHandler"
|
|
|
|
|
|
>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<el-table-column type="selection" width="55"/>
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="销售单号"
|
|
|
|
|
|
min-width="100"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
prop="sale_code"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
2023-07-27 11:22:23 +08:00
|
|
|
|
<el-table-column
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="行号"
|
|
|
|
|
|
min-width="60"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
prop="seq_no"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
show-overflow-tooltip
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<!-- <el-table-column prop="seq_no" label="明细序号" /> -->
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
:min-width="flexWidth('contract_code', crud.data, '合同号')" label="合同号"
|
|
|
|
|
|
prop="contract_code"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
:min-width="flexWidth('material_code', crud.data, '物料编码')" label="物料编码"
|
|
|
|
|
|
prop="material_code"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
:min-width="flexWidth('material_spec', crud.data, '物料规格')"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="物料规格"
|
|
|
|
|
|
prop="material_spec"
|
2023-07-17 16:29:29 +08:00
|
|
|
|
/>
|
|
|
|
|
|
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
|
<!-- :min-width="flexWidth('material_name', crud.data, '物料名称')"-->
|
|
|
|
|
|
<!-- label="物料名称"-->
|
|
|
|
|
|
<!-- prop="material_name"-->
|
|
|
|
|
|
<!-- show-overflow-tooltip-->
|
|
|
|
|
|
<!-- />-->
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column label="工段" prop="product_area">
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.product_area[scope.row.product_area] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column label="订单数量" min-width="80" prop="sale_qty"/>
|
|
|
|
|
|
<el-table-column label="需生产数量" min-width="88" prop="need_product_qty"/>
|
|
|
|
|
|
<el-table-column label="已生产数量" min-width="88" prop="product_qty"/>
|
|
|
|
|
|
<el-table-column label="刻字数量" prop="lettering_qty"/>
|
|
|
|
|
|
<el-table-column label="预入库数量" min-width="88" prop="instor_qty"/>
|
|
|
|
|
|
<el-table-column label="入库数量" prop="in_storage_qty"/>
|
|
|
|
|
|
<el-table-column label="发货数量" prop="sendout_qty"/>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="预入库交期"
|
|
|
|
|
|
min-width="100"
|
|
|
|
|
|
prop="warehousing_date"
|
2023-07-17 16:29:29 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<el-table-column
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="计划交期"
|
|
|
|
|
|
min-width="100"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
prop="plandeliverDate"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="订单交期"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
min-width="100"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
prop="order_date"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column label="订单状态" prop="status">
|
2022-06-27 19:25:41 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.PCS_SALE_STATUS[scope.row.status] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<el-table-column
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="计量单位"
|
|
|
|
|
|
min-width="80"
|
|
|
|
|
|
prop="qty_unit_name"
|
2023-07-17 16:29:29 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
|
<!-- label="后段计划交期"-->
|
|
|
|
|
|
<!-- min-width="100"-->
|
|
|
|
|
|
<!-- prop="behindPlandeliverDate"-->
|
|
|
|
|
|
<!-- show-overflow-tooltip-->
|
|
|
|
|
|
<!-- />-->
|
|
|
|
|
|
<!-- <el-table-column label="后段状态" prop="behind_submit_flag">-->
|
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
|
<!-- {{ dict.label.PCS_SALE_STATUS[scope.row.behind_submit_flag] }}-->
|
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
<!-- </el-table-column>-->
|
2023-07-17 16:29:29 +08:00
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
2023-09-18 13:26:48 +08:00
|
|
|
|
prop="rawmaterial_name"
|
2023-10-07 09:10:11 +08:00
|
|
|
|
label="原辅料信息"
|
|
|
|
|
|
:min-width="flexWidth('rawmaterial_name', crud.data, '原辅料信息')"
|
2023-07-17 16:29:29 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
2023-09-18 13:26:48 +08:00
|
|
|
|
:min-width="flexWidth('rate_qty', crud.data, '单重')"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="单重"
|
|
|
|
|
|
prop="rate_qty"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="canuse_qty"
|
2023-10-07 09:10:11 +08:00
|
|
|
|
label="原辅料库存"
|
|
|
|
|
|
:min-width="flexWidth('canuse_qty', crud.data, '原辅料库存')"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
show-overflow-tooltip
|
2023-10-08 13:25:08 +08:00
|
|
|
|
width="90"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<!-- <el-table-column-->
|
|
|
|
|
|
<!-- prop="early_start_time"-->
|
|
|
|
|
|
<!-- label="最早开始时间"-->
|
|
|
|
|
|
<!-- min-width="100"-->
|
|
|
|
|
|
<!-- show-overflow-tooltip-->
|
|
|
|
|
|
<!-- />-->
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="销售单类型"
|
|
|
|
|
|
min-width="100"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
prop="sale_type"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.PCS_SAL_TYPE[scope.row.sale_type] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column label="生成方式" min-width="100" prop="create_mode">
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column label="创建人" prop="create_name"/>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<el-table-column
|
2023-09-18 13:26:48 +08:00
|
|
|
|
:min-width="flexWidth('createTime', crud.data, '创建时间')"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
label="创建时间"
|
|
|
|
|
|
prop="createTime"
|
2023-09-18 13:26:48 +08:00
|
|
|
|
/>
|
2023-10-08 13:25:08 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
:min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间"
|
|
|
|
|
|
prop="update_time"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
2023-09-18 13:26:48 +08:00
|
|
|
|
label="备注"
|
2023-10-08 13:25:08 +08:00
|
|
|
|
min-width="200"
|
|
|
|
|
|
prop="remark"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
show-overflow-tooltip
|
2023-09-18 13:26:48 +08:00
|
|
|
|
min-width="200"
|
2023-07-05 16:00:55 +08:00
|
|
|
|
/>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
2022-06-27 19:25:41 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<udOperation
|
|
|
|
|
|
:data="scope.row"
|
|
|
|
|
|
:permission="permission"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
</el-table-column> -->
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页组件-->
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<pagination/>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</div>
|
2023-07-17 16:29:29 +08:00
|
|
|
|
<UploadDialog
|
|
|
|
|
|
:dialog-show.sync="uploadShow"
|
|
|
|
|
|
@tableChanged3="tableChanged3"
|
|
|
|
|
|
/>
|
2023-09-18 13:26:48 +08:00
|
|
|
|
<Dialog :dialog-show.sync="dialogShow"/>
|
2022-06-27 19:25:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-07-09 10:21:13 +08:00
|
|
|
|
import crudSaleOrder from '@/views/wms/pcs/saleorder/saleOrder'
|
|
|
|
|
|
import customerbase from '@/api/wms/basedata/master/customerbase'
|
2023-10-08 13:25:08 +08:00
|
|
|
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
2022-06-27 19:25:41 +08:00
|
|
|
|
import rrOperation from '@crud/RR.operation'
|
|
|
|
|
|
import crudOperation from '@crud/CRUD.operation'
|
2023-07-05 16:00:55 +08:00
|
|
|
|
import UploadDialog from '@/views/wms/pcs/saleorder/UploadDialog'
|
2023-03-24 16:57:57 +08:00
|
|
|
|
import Dialog from '@/views/wms/pcs/saleorder/Dialog'
|
2022-06-27 19:25:41 +08:00
|
|
|
|
import pagination from '@crud/Pagination'
|
2023-07-05 16:00:55 +08:00
|
|
|
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
2022-06-27 19:25:41 +08:00
|
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
|
|
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
2023-09-18 13:26:48 +08:00
|
|
|
|
import crudBigScreen from '@/api/wms/bigScreen/bigScreen'
|
2022-06-27 19:25:41 +08:00
|
|
|
|
|
2023-07-05 16:00:55 +08:00
|
|
|
|
const defaultForm = {
|
|
|
|
|
|
sale_id: null,
|
|
|
|
|
|
sale_code: null,
|
|
|
|
|
|
seq_no: null,
|
2023-09-18 13:26:48 +08:00
|
|
|
|
contract_code: null,
|
2023-07-05 16:00:55 +08:00
|
|
|
|
sale_type: null,
|
|
|
|
|
|
material_id: null,
|
|
|
|
|
|
status: null,
|
|
|
|
|
|
sale_qty: null,
|
|
|
|
|
|
produce_seq: null,
|
|
|
|
|
|
cust_id: null,
|
|
|
|
|
|
qty_unit_id: null,
|
|
|
|
|
|
plandeliver_date: null,
|
|
|
|
|
|
create_id: null,
|
|
|
|
|
|
create_name: null,
|
|
|
|
|
|
create_time: null,
|
|
|
|
|
|
update_optid: null,
|
|
|
|
|
|
update_optname: null,
|
|
|
|
|
|
update_time: null,
|
|
|
|
|
|
cust_code: null,
|
|
|
|
|
|
cust_name: null
|
|
|
|
|
|
}
|
2022-06-27 19:25:41 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: 'SaleOrder',
|
2023-07-17 16:29:29 +08:00
|
|
|
|
dicts: ['PCS_SALE_STATUS', 'PCS_SAL_TYPE', 'IS_OR_NOT', 'product_area', 'ST_CREATE_MODE'],
|
|
|
|
|
|
components: {
|
|
|
|
|
|
pagination,
|
|
|
|
|
|
crudOperation,
|
|
|
|
|
|
rrOperation,
|
|
|
|
|
|
Treeselect,
|
|
|
|
|
|
UploadDialog,
|
|
|
|
|
|
Dialog
|
|
|
|
|
|
},
|
2022-06-27 19:25:41 +08:00
|
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
|
|
|
|
cruds() {
|
2023-07-05 16:00:55 +08:00
|
|
|
|
return CRUD({
|
|
|
|
|
|
title: '销售订单',
|
|
|
|
|
|
url: 'api/mpsSaleOrder',
|
|
|
|
|
|
idField: 'sale_id',
|
|
|
|
|
|
sort: 'sale_id,desc',
|
2022-06-27 19:25:41 +08:00
|
|
|
|
optShow: {
|
2023-07-09 10:21:13 +08:00
|
|
|
|
add: true,
|
2023-09-18 13:26:48 +08:00
|
|
|
|
edit: true,
|
2022-06-27 19:25:41 +08:00
|
|
|
|
del: false,
|
|
|
|
|
|
reset: true,
|
|
|
|
|
|
download: false
|
|
|
|
|
|
},
|
2023-07-05 16:00:55 +08:00
|
|
|
|
crudMethod: { ...crudSaleOrder }
|
|
|
|
|
|
})
|
2022-06-27 19:25:41 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-07-17 16:29:29 +08:00
|
|
|
|
unit_list: [{ value: 16, label: '个\\只' }],
|
|
|
|
|
|
customer_list: [],
|
2022-06-27 19:25:41 +08:00
|
|
|
|
classes3: [],
|
2023-07-05 16:00:55 +08:00
|
|
|
|
uploadShow: false,
|
2023-03-24 16:57:57 +08:00
|
|
|
|
dialogShow: false,
|
2023-09-18 13:26:48 +08:00
|
|
|
|
permission: {
|
|
|
|
|
|
add: ['admin', 'roles:add'],
|
|
|
|
|
|
edit: ['admin', 'roles:edit'],
|
|
|
|
|
|
del: ['admin', 'roles:del']
|
|
|
|
|
|
},
|
2023-07-05 16:00:55 +08:00
|
|
|
|
queryTypeOptions: [{ key: 'sale_code', display_name: '销售单号' }]
|
2022-06-27 19:25:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.initClass3()
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2023-07-09 10:21:13 +08:00
|
|
|
|
[CRUD.HOOK.beforeToAdd]() {
|
|
|
|
|
|
customerbase.selectList().then(res => {
|
|
|
|
|
|
this.customer_list = res.content
|
2023-07-17 16:29:29 +08:00
|
|
|
|
})
|
2023-07-09 10:21:13 +08:00
|
|
|
|
},
|
2022-06-27 19:25:41 +08:00
|
|
|
|
queryClassId() {
|
|
|
|
|
|
const param = {
|
2023-07-05 16:00:55 +08:00
|
|
|
|
class_idStr: this.class_idStr
|
2022-06-27 19:25:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
crudClassstandard.queryClassById(param).then(res => {
|
|
|
|
|
|
this.classes = res.content.map(obj => {
|
|
|
|
|
|
if (obj.hasChildren) {
|
|
|
|
|
|
obj.children = null
|
|
|
|
|
|
}
|
|
|
|
|
|
return obj
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-03-24 16:57:57 +08:00
|
|
|
|
importin() {
|
|
|
|
|
|
this.dialogShow = true
|
|
|
|
|
|
},
|
2023-07-05 16:00:55 +08:00
|
|
|
|
tableChanged3() {
|
|
|
|
|
|
this.crud.toQuery()
|
|
|
|
|
|
},
|
2022-06-27 19:25:41 +08:00
|
|
|
|
buildTree(classes) {
|
|
|
|
|
|
classes.forEach(data => {
|
|
|
|
|
|
if (data.children) {
|
|
|
|
|
|
this.buildTree(data.children)
|
|
|
|
|
|
}
|
|
|
|
|
|
if (data.hasChildren && !data.children) {
|
|
|
|
|
|
data.children = null // 重点代码
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取子节点数据
|
|
|
|
|
|
loadChildNodes({ action, parentNode, callback }) {
|
|
|
|
|
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
|
|
|
|
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
|
|
|
|
|
parentNode.children = res.content.map(function(obj) {
|
|
|
|
|
|
if (obj.hasChildren) {
|
|
|
|
|
|
obj.children = null
|
|
|
|
|
|
}
|
|
|
|
|
|
return obj
|
|
|
|
|
|
})
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
callback()
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
initClass3() {
|
|
|
|
|
|
const param = {
|
|
|
|
|
|
parent_class_code: '07'
|
|
|
|
|
|
}
|
|
|
|
|
|
crudClassstandard.getClassType(param).then(res => {
|
|
|
|
|
|
const data = res.content
|
|
|
|
|
|
this.buildTree(data)
|
|
|
|
|
|
this.classes3 = data
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-09-18 13:26:48 +08:00
|
|
|
|
deleteApsData() {
|
|
|
|
|
|
crudSaleOrder.deleteTestData().then((res) => {
|
|
|
|
|
|
this.crud.notify('清空成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2022-06-27 19:25:41 +08:00
|
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
2023-07-05 16:00:55 +08:00
|
|
|
|
<style scoped></style>
|