|
@@ -2,99 +2,38 @@
|
|
|
<div class="borderless">
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- style="border: none;background: none;color: red"
|
|
|
- icon="el-icon-arrow-left"
|
|
|
- @click="backToList"
|
|
|
- >返回列表
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
+ @click="backToList">返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <el-button
|
|
|
- class="el-button--small-yh"
|
|
|
- type="primary"
|
|
|
- :disabled="disabled"
|
|
|
- size="small"
|
|
|
- @click="editCustomer"
|
|
|
- >{{ form.id ? "确认修改" : "确认新增" }}
|
|
|
+ <el-button class="el-button--small-yh" type="primary" :disabled="disabled" size="small" @click="editCustomer">{{
|
|
|
+ form.id ? "确认修改" : "确认新增" }}
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- :disabled="!form.id"
|
|
|
- size="small"
|
|
|
- @click="copyDoc"
|
|
|
- >
|
|
|
+ <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc">
|
|
|
复制单据
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
|
- <el-form
|
|
|
- :model="form"
|
|
|
- ref="form"
|
|
|
- label-width="130px"
|
|
|
- class="demo-ruleForm"
|
|
|
- >
|
|
|
+ <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
|
|
|
<containerTitle title="基础资料"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
<el-row>
|
|
|
- <el-col
|
|
|
- v-for="(item, index) in basicData.column"
|
|
|
- :key="index"
|
|
|
- :span="item.span ? item.span : 6"
|
|
|
- >
|
|
|
- <el-form-item
|
|
|
- :label="item.label"
|
|
|
- :prop="item.prop"
|
|
|
- :rules="item.rules"
|
|
|
- >
|
|
|
- <avue-input-tree
|
|
|
- v-if="item.prop === 'goodsTypeId'"
|
|
|
- leaf-only
|
|
|
- multiple
|
|
|
- style="width: 100%;"
|
|
|
- :props="{ label: 'title' }"
|
|
|
- v-model="form[item.prop]"
|
|
|
- placeholder=" "
|
|
|
- type="tree"
|
|
|
- size="small"
|
|
|
- dataType="string"
|
|
|
- :dic="dicData"
|
|
|
- />
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- v-else-if="item.type === 'textarea'"
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- autocomplete="off"
|
|
|
- placeholder=" "
|
|
|
- ></el-input>
|
|
|
- <el-select
|
|
|
- v-else-if="item.type === 'select'"
|
|
|
- style="width: 100%"
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- placeholder="请选择"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
+ <el-col v-for="(item, index) in basicData.column" :key="index" :span="item.span ? item.span : 6">
|
|
|
+ <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
+ <avue-input-tree v-if="item.prop === 'goodsTypeId'" leaf-only multiple style="width: 100%;"
|
|
|
+ :props="{ label: 'title' }" v-model="form[item.prop]" placeholder=" " type="tree" size="small"
|
|
|
+ dataType="string" :dic="dicData" />
|
|
|
+ <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
|
|
|
+ autocomplete="off" placeholder=" "></el-input>
|
|
|
+ <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"
|
|
|
+ placeholder="请选择" clearable filterable>
|
|
|
<!-- <el-option v-for="(item,index) in selectData" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>-->
|
|
|
</el-select>
|
|
|
- <selectComponent
|
|
|
- v-else-if="item.prop === 'corpId'"
|
|
|
- v-model="form[item.prop]"
|
|
|
- :configuration="configuration"
|
|
|
- typeData="GYS"
|
|
|
- style="width: 100%"
|
|
|
- />
|
|
|
- <el-input
|
|
|
- type="age"
|
|
|
- v-else
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- autocomplete="off"
|
|
|
- ></el-input>
|
|
|
+ <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
|
|
|
+ :configuration="configuration" typeData="GYS" style="width: 100%" />
|
|
|
+ <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -102,203 +41,166 @@
|
|
|
<containerTitle title="包装资料"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
<el-row>
|
|
|
- <el-col
|
|
|
- v-for="(item, index) in packingData.column"
|
|
|
- :key="index"
|
|
|
- :span="item.span ? item.span : 6"
|
|
|
- >
|
|
|
- <el-form-item
|
|
|
- :label="item.label"
|
|
|
- :prop="item.prop"
|
|
|
- :rules="item.rules"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- v-if="item.type === 'textarea'"
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- autocomplete="off"
|
|
|
- placeholder=" "
|
|
|
- ></el-input>
|
|
|
- <el-select
|
|
|
- v-else-if="item.type === 'select'"
|
|
|
- style="width: 100%"
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- placeholder="请选择"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
+ <el-col v-for="(item, index) in packingData.column" :key="index" :span="item.span ? item.span : 6">
|
|
|
+ <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
+ <el-input type="textarea" v-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
|
|
|
+ autocomplete="off" placeholder=" "></el-input>
|
|
|
+ <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"
|
|
|
+ placeholder="请选择" clearable filterable>
|
|
|
<!-- <el-option v-for="(item,index) in selectData" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>-->
|
|
|
</el-select>
|
|
|
- <el-input
|
|
|
- type="age"
|
|
|
- v-else
|
|
|
- v-model="form[item.prop]"
|
|
|
- size="small"
|
|
|
- autocomplete="off"
|
|
|
- ></el-input>
|
|
|
+ <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</basic-container>
|
|
|
+ <!-- <containerTitle title="属性资料"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 10px">
|
|
|
+ <div class="settingBut">
|
|
|
+ <el-button size="mini" @click="saveSetting" v-if="labelShow" type="primary">保存</el-button>
|
|
|
+ <el-button size="mini" @click="labelShow = false" v-if="labelShow">取消</el-button>
|
|
|
+ <el-tooltip effect="dark" content="Label名设置" placement="bottom" v-if="!labelShow">
|
|
|
+ <el-button icon="el-icon-setting" circle size="mini" @click="setting"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ <avue-form ref="form" v-model="propertyForm" :option="propertyOption" class="ad">
|
|
|
+ <template slot="remarksOneLabel" v-if="labelShow">
|
|
|
+ <el-input v-model="labelForm.label1" placeholder="请输入内容"></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customTwoLabel" v-if="labelShow">
|
|
|
+ <el-input v-model="labelForm.label2" placeholder="请输入内容"></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customThreeLabel" v-if="labelShow">
|
|
|
+ <el-input v-model="labelForm.label3" placeholder="请输入内容"></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customFourLabel" v-if="labelShow">
|
|
|
+ <el-input v-model="labelForm.label4" placeholder="请输入内容"></el-input>
|
|
|
+ </template>
|
|
|
+ <template slot="customFiveLabel" v-if="labelShow">
|
|
|
+ <el-input v-model="labelForm.label5" placeholder="请输入内容"></el-input>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ </basic-container> -->
|
|
|
<containerTitle title="商品规格"></containerTitle>
|
|
|
<basic-container>
|
|
|
<avue-crud :data="sftData" :option="sftOption" @row-del="rowSftDel">
|
|
|
<template slot="menuLeft" slot-scope="{ row, index }">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="small"
|
|
|
- @click.stop="addSftRow(row, index)"
|
|
|
- >新增明细</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addSftRow(row, index)">新增明细
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="attributeName" slot-scope="{ row, index }">
|
|
|
+ <span v-if="row.$cellEdit">
|
|
|
+ <el-select v-model="row.attributeName" placeholder="请选择" size="small" @change="cnameChange(row)">
|
|
|
+ <el-option v-for="item in goodsProps" :key="item.id" :label="item.dictValue" :value="item.dictValue">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span v-else> {{ row.attributeName }}</span>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- type="text"
|
|
|
- @click.stop="rowSftEdit(row, index)"
|
|
|
- >
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowSftEdit(row, index)">
|
|
|
{{ row.$cellEdit ? "保存" : "编辑" }}
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- icon="el-icon-edit"
|
|
|
- type="text"
|
|
|
- @click.stop="rowSftDel(row, index)"
|
|
|
- >
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowSftDel(row, index)">
|
|
|
删 除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
+ <containerTitle title="配件信息"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 10px">
|
|
|
+ <avue-crud ref="crud" :data="partList" :option="partOption" @saveColumn="partsaveColumn"
|
|
|
+ :cell-style="cellStyle">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="rowAdd">选择</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button type="text" size="small" @click.stop="rowDel(row, index)" icon="el-icon-delete">删除</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="goodNumber" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" v-model="row.goodNumber" size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ @change="priceChange(row)"></el-input>
|
|
|
+ <span v-else>{{ row.goodNumber }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="price" slot-scope="{ row }">
|
|
|
+ <span>{{ row.price | micrometerFormat }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="corpId" slot-scope="{ row }">
|
|
|
+ <span>{{ row.corpName }}</span>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
<containerTitle title="销售价格"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
- <avue-crud
|
|
|
- :option="customerContact"
|
|
|
- v-model="contactsForm"
|
|
|
- :data="contactsData"
|
|
|
- ref="crudContact"
|
|
|
- @row-save="rowContactSave"
|
|
|
- @row-del="rowContactsDel"
|
|
|
- >
|
|
|
+ <avue-crud :option="customerContact" v-model="contactsForm" :data="contactsData" ref="crudContact"
|
|
|
+ @row-save="rowContactSave" @row-del="rowContactsDel">
|
|
|
<template slot-scope="{ row, index }" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="rowContactCell(row, index)"
|
|
|
- >{{ row.$cellEdit ? "修改完成" : "修改" }}
|
|
|
+ <el-button type="text" size="small" @click="rowContactCell(row, index)">{{ row.$cellEdit ? "修改完成" : "修改"
|
|
|
+ }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<containerTitle title="采购价格"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
- <avue-crud
|
|
|
- :option="customerPurchase"
|
|
|
- v-model="contactsForm"
|
|
|
- :data="purchaseData"
|
|
|
- ref="crudPurchase"
|
|
|
- @row-save="rowPurchaseSave"
|
|
|
- @row-del="rowPurchaseDel"
|
|
|
- >
|
|
|
+ <avue-crud :option="customerPurchase" v-model="contactsForm" :data="purchaseData" ref="crudPurchase"
|
|
|
+ @row-save="rowPurchaseSave" @row-del="rowPurchaseDel">
|
|
|
<template slot="corpId" slot-scope="{ row }">
|
|
|
- <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;"
|
|
|
- >*</span
|
|
|
- >
|
|
|
+ <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
|
|
|
<span style="margin-left: 12px;padding-top: 2px">{{
|
|
|
- row.corpName
|
|
|
+ row.corpName
|
|
|
}}</span>
|
|
|
- <el-button
|
|
|
- v-if="row.$cellEdit"
|
|
|
- type="text"
|
|
|
- size="mini"
|
|
|
- style="float: right"
|
|
|
- @click="selectUser(row)"
|
|
|
- >选择</el-button
|
|
|
- >
|
|
|
+ <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="selectUser(row)">选择
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- @click="rowPurchaseCell(row, index)"
|
|
|
- >{{ row.$cellEdit ? "修改完成" : "修改" }}
|
|
|
+ <el-button type="text" size="small" @click="rowPurchaseCell(row, index)">{{ row.$cellEdit ? "修改完成" : "修改"
|
|
|
+ }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<containerTitle title="商品图片"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
- <avue-crud
|
|
|
- ref="imgUpload"
|
|
|
- :option="imgUploadList"
|
|
|
- :data="imgUploadData"
|
|
|
- @row-save="imgUploadSave"
|
|
|
- @row-update="imgUploadUpdate"
|
|
|
- @row-del="imgUploadDel"
|
|
|
- :upload-before="uploadBefore"
|
|
|
- ></avue-crud>
|
|
|
+ <avue-crud ref="imgUpload" :option="imgUploadList" :data="imgUploadData" @row-save="imgUploadSave"
|
|
|
+ @row-update="imgUploadUpdate" @row-del="imgUploadDel" :upload-before="uploadBefore"></avue-crud>
|
|
|
</basic-container>
|
|
|
<containerTitle title="详情页编辑"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
<avue-ueditor v-model="text" :options="options"></avue-ueditor>
|
|
|
</basic-container>
|
|
|
</el-form>
|
|
|
- <el-dialog
|
|
|
- title="导入供应商"
|
|
|
- :visible.sync="userDialog"
|
|
|
- class="el-dialogDeep"
|
|
|
- append-to-body
|
|
|
- :close-on-click-modal="false"
|
|
|
- width="80%"
|
|
|
- >
|
|
|
+ <el-dialog title="导入供应商" :visible.sync="userDialog" class="el-dialogDeep" append-to-body
|
|
|
+ :close-on-click-modal="false" width="80%">
|
|
|
<el-row style="margin-top: -5px;height: 0">
|
|
|
<el-col :span="5">
|
|
|
<div class="box">
|
|
|
<el-scrollbar>
|
|
|
<basic-container>
|
|
|
- <avue-tree
|
|
|
- :option="userTreeOption"
|
|
|
- :data="userTreeData"
|
|
|
- @node-click="userNodeClick"
|
|
|
- />
|
|
|
+ <avue-tree :option="userTreeOption" :data="userTreeData" @node-click="userNodeClick" />
|
|
|
</basic-container>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="19">
|
|
|
<basic-container>
|
|
|
- <avue-crud
|
|
|
- ref="userCrud"
|
|
|
- :option="userOption"
|
|
|
- :data="userDataList"
|
|
|
- :table-loading="userLoading"
|
|
|
- :page.sync="userPage"
|
|
|
- v-model="userForm"
|
|
|
- @search-change="userSearchChange"
|
|
|
- @search-reset="userSearchReset"
|
|
|
- @refresh-change="userRefreshChange"
|
|
|
- @selection-change="userSelectionChange"
|
|
|
- @on-load="userOnLoad"
|
|
|
- >
|
|
|
+ <avue-crud ref="userCrud" :option="userOption" :data="userDataList" :table-loading="userLoading"
|
|
|
+ :page.sync="userPage" v-model="userForm" @search-change="userSearchChange"
|
|
|
+ @search-reset="userSearchReset" @refresh-change="userRefreshChange"
|
|
|
+ @selection-change="userSelectionChange" @on-load="userOnLoad">
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="userDialog = false">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :disabled="this.userSelection.length == 1 ? false : true"
|
|
|
- @click="userConfirm"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" :disabled="this.userSelection.length == 1 ? false : true" @click="userConfirm">确 定
|
|
|
+ </el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+ <price-library ref="library" @librayToPart="librayToPart" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -319,10 +221,20 @@ import {
|
|
|
import userOption from "../customerInformation/configuration/mainList.json";
|
|
|
import sftOption from "./configuration/specification.json";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import priceLibrary from "@/components/price-Library/main";
|
|
|
+import _ from "lodash";
|
|
|
+import partOption from "./configuration/partList.json";
|
|
|
+import { costCal } from "@/util/calculate";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ goodsProps: [],
|
|
|
+ propertyForm: {},
|
|
|
+ labelShow: false,
|
|
|
+ labelForm: {},
|
|
|
+ partOption: partOption,
|
|
|
+ partList: [],
|
|
|
configuration: {
|
|
|
multipleChoices: false,
|
|
|
multiple: false,
|
|
@@ -631,7 +543,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
label: "装箱量",
|
|
|
prop: "ctn",
|
|
|
rules: [
|
|
@@ -658,11 +570,67 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
detailsSelect: {},
|
|
|
+ propertyOption: {
|
|
|
+ menuBtn: false,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "螺纹",
|
|
|
+ prop: "remarksOne",
|
|
|
+ labelslot: true,
|
|
|
+ span: 12,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=Thread",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "介质",
|
|
|
+ prop: "customTwo",
|
|
|
+ span: 12,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=medium",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "颜色",
|
|
|
+ prop: "customThree",
|
|
|
+ span: 12,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=property_color",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "钢印",
|
|
|
+ prop: "customFour",
|
|
|
+ span: 12,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=stencil",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "特别提示",
|
|
|
+ prop: "customFive",
|
|
|
+ span: 24
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
//用户窗口定义
|
|
|
userTreeOption: {
|
|
|
nodeKey: "id",
|
|
|
lazy: true,
|
|
|
- treeLoad: function(node, resolve) {
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
const parentId = node.level === 0 ? 0 : node.data.id;
|
|
|
getDeptLazyTree(parentId).then(res => {
|
|
|
resolve(
|
|
@@ -696,7 +664,7 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0,
|
|
|
pageSize: 10
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -704,8 +672,11 @@ export default {
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ priceLibrary
|
|
|
+ },
|
|
|
//初始化查询
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
getDeptTree().then(res => {
|
|
|
this.dicData = res.data.data;
|
|
|
});
|
|
@@ -755,6 +726,18 @@ export default {
|
|
|
delete e.isDeleted;
|
|
|
});
|
|
|
}
|
|
|
+ if (res.data.data.priceBankList) {
|
|
|
+ res.data.data.priceBankList.forEach(e => {
|
|
|
+ delete e.id;
|
|
|
+ delete e.pid;
|
|
|
+ delete e.createTime;
|
|
|
+ delete e.createUser;
|
|
|
+ delete e.updateTime;
|
|
|
+ delete e.updateUser;
|
|
|
+ delete e.status;
|
|
|
+ delete e.isDeleted;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
this.form = res.data.data;
|
|
|
if (res.data.data.saleGoodsPrice) {
|
|
@@ -763,14 +746,21 @@ export default {
|
|
|
if (res.data.data.buyGoodsPrice) {
|
|
|
this.purchaseData = res.data.data.buyGoodsPrice;
|
|
|
}
|
|
|
+ if (res.data.data.priceBankList) {
|
|
|
+ this.partList = res.data.data.priceBankList
|
|
|
+ }
|
|
|
this.sftData = this.form.goodsSpecificationList
|
|
|
? this.form.goodsSpecificationList
|
|
|
: [];
|
|
|
});
|
|
|
}
|
|
|
+ this.propertyOption = await this.getColumnData(this.getColumnName(52), this.propertyOption);
|
|
|
if (!this.permission.goods_gys) {
|
|
|
- this.basicData.column.splice(this.basicData.column.findIndex(item => item.prop =='corpId'), 1)
|
|
|
+ this.basicData.column.splice(this.basicData.column.findIndex(item => item.prop == 'corpId'), 1)
|
|
|
}
|
|
|
+ this.getWorkDicts("goods_Props").then(res => {
|
|
|
+ this.goodsProps = res.data.data;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
copyDoc() {
|
|
@@ -786,11 +776,6 @@ export default {
|
|
|
addSftRow() {
|
|
|
this.sftData.push({
|
|
|
$cellEdit: true,
|
|
|
- cname: null,
|
|
|
- texture: null,
|
|
|
- colour: null,
|
|
|
- describe: null,
|
|
|
- remarks: null
|
|
|
});
|
|
|
},
|
|
|
rowContactSave(row, done, loading) {
|
|
@@ -852,7 +837,30 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- rowSftDel(row, index) {},
|
|
|
+ rowSftDel(row, index) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ console.log('待开发')
|
|
|
+ // priceDelete(row.id).then(res => {
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "操作成功!"
|
|
|
+ // });
|
|
|
+ // this.purchaseData.splice(index, 1);
|
|
|
+ // });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.SftData.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//修改提交触发
|
|
|
editCustomer() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
@@ -886,12 +894,20 @@ export default {
|
|
|
this.form.corpName = e.cname;
|
|
|
}
|
|
|
});
|
|
|
+ let idsArr = []
|
|
|
+ if (this.partList.length > 0) {
|
|
|
+ this.partList.forEach(e => {
|
|
|
+ idsArr.push(e.id)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ let ids = idsArr.join(',')
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
type: 0,
|
|
|
saleGoodsPrice: this.contactsData,
|
|
|
buyGoodsPrice: this.purchaseData,
|
|
|
- goodsSpecificationList: this.sftData
|
|
|
+ goodsSpecificationList: this.sftData,
|
|
|
+ partsIds: ids
|
|
|
};
|
|
|
updateDetail(params).then(res => {
|
|
|
this.$message({
|
|
@@ -913,7 +929,7 @@ export default {
|
|
|
this.userOnLoad(this.userPage, params);
|
|
|
done();
|
|
|
},
|
|
|
- userSearchReset() {},
|
|
|
+ userSearchReset() { },
|
|
|
userRefreshChange() {
|
|
|
this.userOnLoad(this.userPage);
|
|
|
},
|
|
@@ -982,6 +998,22 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ cnameChange(row) {
|
|
|
+ if (row.attributeName) {
|
|
|
+ this.goodsProps.forEach(e => {
|
|
|
+ if (row.attributeName == e.dictValue) {
|
|
|
+ row.attributeNo = e.dictKey
|
|
|
+ this.getWorkDicts(e.dictKey).then(res => {
|
|
|
+ // row.attributeData =JSON.stringify(res.data.data);
|
|
|
+ this.$set(row, "attributeData",JSON.stringify(res.data.data));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ row.attributeNo = null
|
|
|
+ row.attributeData = null
|
|
|
+ }
|
|
|
+ },
|
|
|
// 上传前
|
|
|
uploadBefore(file, done, loading, column) {
|
|
|
const is2M = file.size / 1024 / 1024 < 2;
|
|
@@ -1022,6 +1054,35 @@ export default {
|
|
|
};
|
|
|
img.src = _URL.createObjectURL(file);
|
|
|
},
|
|
|
+ partsaveColumn(row, column) {
|
|
|
+ console.log(row, column);
|
|
|
+ },
|
|
|
+ rowEdit(row, index) {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowAdd() {
|
|
|
+ this.$refs.library.init(true);
|
|
|
+ },
|
|
|
+ priceChange(row) {
|
|
|
+ row.amout = Number(
|
|
|
+ _.multiply(
|
|
|
+ Number(row.goodNumber ? row.goodNumber : 0),
|
|
|
+ Number(row.price ? row.price : 0)
|
|
|
+ )
|
|
|
+ ).toFixed(2);
|
|
|
+ },
|
|
|
+ librayToPart(rows) {
|
|
|
+ rows.forEach(e => {
|
|
|
+ this.partList.push({
|
|
|
+ ...e,
|
|
|
+ $cellEdit: true
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
//返回列表
|
|
|
backToList() {
|
|
|
this.$emit("goBack");
|
|
@@ -1034,9 +1095,15 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.settingBut {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+
|
|
|
::v-deep .el-form-item__content {
|
|
|
line-height: 32px;
|
|
|
}
|
|
|
+
|
|
|
.back-icon {
|
|
|
line-height: 64px;
|
|
|
font-size: 20px;
|
|
@@ -1047,6 +1114,10 @@ export default {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
+.ad ::v-deep .el-form-item {
|
|
|
+ margin-bottom: 8px;
|
|
|
+}
|
|
|
+
|
|
|
.el-dialogDeep {
|
|
|
::v-deep .el-dialog {
|
|
|
margin: 1vh auto 0 !important;
|