rev:提交aps相关代码
This commit is contained in:
@@ -9,17 +9,17 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
label-width="80px"
|
||||
>
|
||||
|
||||
<el-form-item label="车间">
|
||||
<el-select
|
||||
v-model="query.workshop_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
size="mini"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
@@ -33,44 +33,27 @@
|
||||
<el-form-item label="需求日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
align="center"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
align="center"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
class="filter-item"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="生成方式"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CREATE"
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -80,24 +63,24 @@
|
||||
<el-form-item label="物料">
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="编码、名称"
|
||||
size="mini"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
:disabled="crud.selections.length === 0"
|
||||
class="filter-item"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="commit(crud.selections)"
|
||||
>
|
||||
提交采购
|
||||
@@ -107,31 +90,29 @@
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
:summary-method="getSummaries"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@select-all="crud.selectAllChange"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="workshop_id" label="车间" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" width="130" label="物料编号"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" width="130" label="物料名称"/>
|
||||
<el-table-column prop="ask_time" label="要求到货日期" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip prop="qty" min-width="120" label="重量"/>
|
||||
<!-- <el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="安全库存" />-->
|
||||
<!-- <el-table-column label="总重量" align="center" prop="total_qty"/>-->
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="stateFormat"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="生成方式" align="center" prop="create_mode" :formatter="createModeFormat"/>
|
||||
<el-table-column label="创建人" align="center" prop="create_name" width="150" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="提交人" align="center" prop="audit_namne" width="150" />
|
||||
<el-table-column label="提交时间" align="center" prop="audit_time" width="140px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column label="车间" prop="workshop_id" show-overflow-tooltip/>
|
||||
<el-table-column label="物料编号" prop="material_code" show-overflow-tooltip width="130"/>
|
||||
<el-table-column :min-width="flexWidth('material_name', crud.data, '物料名称')" label="物料名称" prop="material_name" show-overflow-tooltip/>
|
||||
<el-table-column :min-width="flexWidth('ask_time', crud.data, '要求到货日期')" label="要求到货日期" prop="askTime"/>
|
||||
<el-table-column label="重量" min-width="120" prop="show_qty" show-overflow-tooltip/>
|
||||
<!-- <el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="安全库存" />-->
|
||||
<!-- <el-table-column label="总重量" align="center" prop="total_qty"/>-->
|
||||
<el-table-column :formatter="stateFormat" align="center" label="状态" prop="status"/>
|
||||
<el-table-column :formatter="createModeFormat" align="center" label="生成方式" prop="create_mode" width="110"/>
|
||||
<el-table-column align="center" label="创建人" prop="create_name" width="150"/>
|
||||
<el-table-column align="center" label="创建时间" prop="createTime" width="150"/>
|
||||
<el-table-column align="center" label="备注" prop="remark"/>
|
||||
<el-table-column v-permission="[]" align="center" fixed="right" label="操作" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
@@ -141,9 +122,9 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<AddDialog @AddChanged="querytable"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -169,7 +150,7 @@ export default {
|
||||
query: {
|
||||
'status': '0'
|
||||
},
|
||||
url: '/api/pcsIfPurchaseorder',
|
||||
url: '/api/pcsIfPurchaseorder/query',
|
||||
crudMethod: { ...crudPurchase }
|
||||
})
|
||||
},
|
||||
@@ -203,27 +184,27 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
sums[index] = '合计'
|
||||
return
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (column.property === 'qty') {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (column.property === 'show_qty') {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev;
|
||||
return prev
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' KG';
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(3) + ' KG'
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
})
|
||||
return sums
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_RAW_IN_TYPE[row.bill_type]
|
||||
@@ -247,7 +228,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style lang="scss" rel="stylesheet/scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user