|
@@ -1,427 +0,0 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <!-- 页面主体内容 -->
|
|
|
- <div class="planAddContent" v-show="contentShow">
|
|
|
- <Card style="width:100%" :bordered="false" :dis-hover="true">
|
|
|
- <p slot="title">申购计划详情</p>
|
|
|
- <div slot="extra">
|
|
|
- <Button>保存</Button>
|
|
|
- <Button>提交</Button>
|
|
|
- <Button @click="$emit('return')">取消</Button>
|
|
|
- </div>
|
|
|
- <Row class="mainCont">
|
|
|
- <Col span="4" class-name="tables">计划单据号</Col>
|
|
|
- <Col span="4" class-name="tables">计算属性</Col>
|
|
|
- <Col span="4" class-name="tables">所属区域</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <Select clearable v-model="form.ssqy" style="width: 95%">
|
|
|
- <Option
|
|
|
- v-for="item in ssqyList"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">所属项目</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <Select clearable v-model="form.ssxm" style="width: 95%">
|
|
|
- <Option
|
|
|
- v-for="item in ssxmList"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">标题</Col>
|
|
|
- <Col span="4" class-name="tables">计算属性</Col>
|
|
|
- <Col span="4" class-name="tables">参考总价(元)</Col>
|
|
|
- <Col span="4" class-name="tables">计算属性</Col>
|
|
|
- <Col span="4" class-name="tables">计划类型</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <Select clearable v-model="form.jhlx" style="width: 95%">
|
|
|
- <Option
|
|
|
- v-for="item in jhlxList"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">计划月份</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <DatePicker
|
|
|
- style="width: 95%"
|
|
|
- format="yyyy-MM"
|
|
|
- :value="form.date"
|
|
|
- @on-change="form.date=$event"
|
|
|
- type="month"
|
|
|
- placeholder="请选择"
|
|
|
- ></DatePicker>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">分管采购员</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <Select clearable v-model="form.fgcgy" style="width: 95%">
|
|
|
- <Option v-for="item in cgyList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">申请人</Col>
|
|
|
- <Col span="4" class-name="tables">
|
|
|
- <Select clearable v-model="form.sqr" style="width: 95%">
|
|
|
- <Option v-for="item in sqrList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="4" class-name="tables">审批状态</Col>
|
|
|
- <Col span="4" class-name="tables">计算属性</Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- </Row>
|
|
|
- <Row class="uplCont" type="flex" justify="center" style="align-items: stretch">
|
|
|
- <Col span="4" class-name="upl">附件</Col>
|
|
|
- <Col span="10" class-name="uplf">
|
|
|
- <Upload
|
|
|
- style="width: 80%"
|
|
|
- multiple
|
|
|
- type="drag"
|
|
|
- action="/purchase/common/uploadFile"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- :on-success="uploadFilesSuccess"
|
|
|
- :show-upload-list="false"
|
|
|
- :on-progress="upFilesLoading"
|
|
|
- >
|
|
|
- <!-- :default-file-list="xzwgForm.filesList" -->
|
|
|
- <div style="padding: 5px 0">
|
|
|
- <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
|
|
|
- <span>点击或将文件拖拽到这里上传</span>
|
|
|
- </div>
|
|
|
- </Upload>
|
|
|
- </Col>
|
|
|
- <Col span="10" class="upl" style="padding: 5px">
|
|
|
- <div v-for="(item, index) in form.filesList" :key="index">
|
|
|
- <a href="javascript:;">{{ item.fullName }}</a>
|
|
|
- <span style="float: right; cursor:pointer" @click="form.filesList.splice(index, 1)">x</span>
|
|
|
- </div>
|
|
|
- <p v-if="uploading" style="text-align: center">上传中...</p>
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- <Row class="mainCont">
|
|
|
- <Col span="4" class-name="tables">说明</Col>
|
|
|
- <Col span="20" class-name="tables">
|
|
|
- <Input v-model="form.sm" placeholder="请输入" style="width: 99%" />
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- <Spin size="large" fix v-if="spinShow"></Spin>
|
|
|
- </Card>
|
|
|
- <Card style="width:100%" :bordered="false" :dis-hover="true">
|
|
|
- <p slot="title">申购计划明细</p>
|
|
|
- <div slot="extra">
|
|
|
- <Button type="primary" @click="plszOpen">批量设置</Button>
|
|
|
- <Button type="primary">批量导入</Button>
|
|
|
- <Button type="primary" @click="contentShow = false">新增明细</Button>
|
|
|
- </div>
|
|
|
- <Table
|
|
|
- :columns="tableColumn"
|
|
|
- style="width: 100%"
|
|
|
- :data="tableData"
|
|
|
- :loading="tableLoading"
|
|
|
- @on-select="tableOnSelect"
|
|
|
- >
|
|
|
- <template slot-scope="{ row, index }" slot="sgsl">
|
|
|
- <div>
|
|
|
- <Input v-model="tableData[index].sgsl" placeholder="请输入" style="width: 95%" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row, index }" slot="rkck">
|
|
|
- <Select clearable v-model="tableData[index].rkck" style="width: 95%" :transfer="true">
|
|
|
- <Option v-for="item in ckList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row, index }" slot="djr">
|
|
|
- <div>
|
|
|
- <Input v-model="tableData[index].djr" placeholder="请输入" style="width: 95%" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row, index }" slot="djlx">
|
|
|
- <Select clearable v-model="tableData[index].rkck" style="width: 95%" :transfer="true">
|
|
|
- <Option v-for="item in djList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row, index }" slot="jhdhsj">
|
|
|
- <DatePicker
|
|
|
- :transfer="true"
|
|
|
- format="yyyy-MM-dd"
|
|
|
- type="date"
|
|
|
- :value="tableData[index].jhdhsj"
|
|
|
- @on-change="tableData[index].jhdhsj=$event"
|
|
|
- placeholder="请选择"
|
|
|
- style="width: 95%"
|
|
|
- ></DatePicker>
|
|
|
- </template>
|
|
|
- <!-- @on-change="((val, date) => tableDateChange(val, date ,index))" -->
|
|
|
- <template slot-scope="{ row, index }" slot="bz">
|
|
|
- <Input v-model="tableData[index].bz" placeholder="请输入" style="width: 95%" />
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row, index }" slot="cz">
|
|
|
- <div>
|
|
|
- <a href="javascript:;">删除</a>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </Table>
|
|
|
- </Card>
|
|
|
- <Modal v-model="plszShow" title="批量设置" @on-ok="plszOk" @on-cancel="plszCancel">
|
|
|
- <Row class="mainCont">
|
|
|
- <Col span="12" class-name="tables">入库仓库</Col>
|
|
|
- <Col span="12" class-name="tables">
|
|
|
- <Select clearable v-model="plrkck" style="width: 95%" :transfer="true">
|
|
|
- <Option v-for="item in ckList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
- </Select>
|
|
|
- </Col>
|
|
|
- <Col span="12" class-name="tables">计划到货时间</Col>
|
|
|
- <Col span="12" class-name="tables">
|
|
|
- <DatePicker
|
|
|
- :transfer="true"
|
|
|
- format="yyyy-MM-dd"
|
|
|
- type="date"
|
|
|
- :value="pldhsj"
|
|
|
- @on-change="pldhsj=$event"
|
|
|
- placeholder="请选择"
|
|
|
- style="width: 95%"
|
|
|
- ></DatePicker>
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- </Modal>
|
|
|
- </div>
|
|
|
- <!-- 计划明细新增 -->
|
|
|
- <planMxAdd @return="contentShow = true" v-show="!contentShow" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import planMxAdd from "./planMxAdd";
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- planMxAdd
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- spinShow: true,
|
|
|
- contentShow: true,
|
|
|
- form: {
|
|
|
- date: "",
|
|
|
- ssqy: "", //所属区域
|
|
|
- ssxm: "", //所属项目
|
|
|
- jhlx: "", //计划类型
|
|
|
- fgcgy: "", //分管采购员
|
|
|
- sqr: "", //申请人
|
|
|
- filesList: []
|
|
|
- },
|
|
|
- ssqyList: [],
|
|
|
- ssxmList: [],
|
|
|
- jhlxList: [],
|
|
|
- cgyList: [],
|
|
|
- sqrList: [],
|
|
|
- uploading: false,
|
|
|
- // 批量设置
|
|
|
- plszShow: false,
|
|
|
- plrkck: "",
|
|
|
- pldhsj: "",
|
|
|
- // table
|
|
|
- ckList: [],
|
|
|
- djList: [],
|
|
|
- tableColumn: [
|
|
|
- {
|
|
|
- type: "selection",
|
|
|
- width: 60,
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "采购订单",
|
|
|
- key: "cgdd",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "物料编码",
|
|
|
- key: "wlbm",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "物料分类",
|
|
|
- key: "wlfl",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "物料名称",
|
|
|
- key: "wlmc",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "规格型号",
|
|
|
- key: "ggxh",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "单位",
|
|
|
- key: "dw",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "库存量",
|
|
|
- key: "kcl",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "申购数量",
|
|
|
- slot: "sgsl",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "参考单价(元)",
|
|
|
- key: "ckdj",
|
|
|
- tooltip: "true",
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: "参考总价(元)",
|
|
|
- key: "ckzj",
|
|
|
- tooltip: "true",
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: "入库仓库",
|
|
|
- slot: "rkck",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "对接人",
|
|
|
- slot: "djr",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "单据类型",
|
|
|
- slot: "djlx",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "计划到货时间",
|
|
|
- slot: "jhdhsj",
|
|
|
- tooltip: "true",
|
|
|
- width: 130
|
|
|
- },
|
|
|
- {
|
|
|
- title: "备注",
|
|
|
- slot: "bz",
|
|
|
- tooltip: "true",
|
|
|
- width: 100
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- slot: "cz",
|
|
|
- tooltip: "true",
|
|
|
- width: 60
|
|
|
- }
|
|
|
- ],
|
|
|
- tableData: [],
|
|
|
- tableSelect: [],
|
|
|
- tableLoading: false
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getTableData();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- //批量设置弹窗
|
|
|
- plszOpen() {
|
|
|
- this.plszShow = true;
|
|
|
- },
|
|
|
- plszOk() {},
|
|
|
- plszCancel() {},
|
|
|
- //表单上传
|
|
|
- beforeUpload() {},
|
|
|
- upFilesLoading() {
|
|
|
- this.uploading = true;
|
|
|
- },
|
|
|
- uploadFilesSuccess(response, file, fileList) {
|
|
|
- this.uploading = false;
|
|
|
- this.form.filesList.push({
|
|
|
- fileName: response.fileInfo.fileName,
|
|
|
- fullName: response.fileInfo.fName,
|
|
|
- resPath: response.fileInfo.resPath,
|
|
|
- fileDetailType: ""
|
|
|
- });
|
|
|
- },
|
|
|
- //获取明细列表
|
|
|
- getTableData() {
|
|
|
- this.spinShow = false;
|
|
|
- },
|
|
|
- tableOnSelect(selection, row) {},
|
|
|
- //返回、取消
|
|
|
- cancel() {
|
|
|
- this.spinShow = true;
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-button {
|
|
|
- min-width: 80px;
|
|
|
-}
|
|
|
-.uplCont {
|
|
|
- border-left: 1px solid #e4e4e4;
|
|
|
- .upl {
|
|
|
- flex: auto;
|
|
|
- border-right: 1px solid #e4e4e4;
|
|
|
- &:nth-child(1) {
|
|
|
- background: #f8f9fb;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
- }
|
|
|
- .uplf {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- min-height: 80px;
|
|
|
- }
|
|
|
-}
|
|
|
-.mainCont .tables {
|
|
|
- height: 50px;
|
|
|
- border-right: 1px solid #e4e4e4;
|
|
|
- border-bottom: 1px solid #e4e4e4;
|
|
|
- line-height: 50px;
|
|
|
- text-align: center;
|
|
|
- &:nth-child(2n + 1) {
|
|
|
- background: #f8f9fb;
|
|
|
- }
|
|
|
-}
|
|
|
-.mainCont {
|
|
|
- border-left: 1px solid #e4e4e4;
|
|
|
- border-top: 1px solid #e4e4e4;
|
|
|
-}
|
|
|
-ivu-card-head-inner,
|
|
|
-.ivu-card-head p {
|
|
|
- display: inline-block;
|
|
|
- width: 100%;
|
|
|
- height: 20px;
|
|
|
- line-height: 20px;
|
|
|
- font-size: 14px;
|
|
|
- color: #17233d;
|
|
|
- font-weight: 700;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- font-weight: normal;
|
|
|
-}
|
|
|
-</style>
|