Merge branch 'master' of http://222.71.245.114:9086/r/iWare_RawMaterialWarehouse
| | |
| | | import { axios } from '@/utils/request' |
| | | |
| | | /** |
| | | * 查询客户档案 |
| | | * 查询往来关系 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 客户档案列表 |
| | | * 往来关系列表 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加客户档案 |
| | | * 添加往来关系 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 编辑客户档案 |
| | | * 编辑往来关系 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除客户档案 |
| | | * 删除往来关系 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * 导出客户档案的Excel文件 |
| | | * 导出往来关系的Excel文件 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导入客户档案的Excel文件 |
| | | * 导入往来关系的Excel文件 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * 下载客户档案的Excel导入模板 |
| | | * 下载往来关系的Excel导入模板 |
| | | * |
| | | * @author ly |
| | | */ |
| | |
| | | <a-form-item label="退货方" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入退货方" v-decorator="['returnGoods']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户编号" v-decorator="['returnGoodsOrderNo']" /> |
| | | <a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入编号" v-decorator="['returnGoodsOrderNo']" /> |
| | | </a-form-item> |
| | | <a-form-item label="销售单据" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入销售单据" v-decorator="['saleOrderNo']" /> |
| | |
| | | dataIndex: 'returnGoods' |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | dataIndex: 'returnGoodsOrderNo' |
| | | }, |
| | |
| | | <template> |
| | | <a-modal |
| | | title="新增客户档案" |
| | | title="新增往来关系" |
| | | :width="1100" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入客户中文名称!'}]}]" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入中文名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入助记码" v-decorator="['mnemonicCode']" /> |
| | |
| | | <template> |
| | | <a-modal |
| | | title="编辑客户档案" |
| | | title="编辑往来关系" |
| | | :width="1100" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入客户中文名称!'}]}]" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入中文名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入助记码" v-decorator="['mnemonicCode']" /> |
| | |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="48"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入客户编号"/> |
| | | <a-form-item label="编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入编号"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入客户中文名称"/> |
| | | <a-form-item label="中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入中文名称"/> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入客户英文名称"/> |
| | | <a-form-item label="英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入英文名称"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | |
| | | <a-button type="info" v-if="hasPerm('BaseCustomer:exportExcel')" icon="download" @click="BaseCustomerToExcel()"> |
| | | 导出 |
| | | </a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增客户档案</a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增往来关系</a-button> |
| | | </div> |
| | | </template> |
| | | <span slot="custTypescopedSlots" slot-scope="text"> |
| | |
| | | customRender: (text, record, index) => `${index + 1 + (this.pageInfo.current - 1) * this.pageInfo.pageSize}` |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custCode' |
| | | }, |
| | | { |
| | | title: '客户中文名称', |
| | | title: '中文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custChinaName' |
| | | }, |
| | | { |
| | | title: '客户英文名称', |
| | | title: '英文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | <!-- <a-form-item label="仓库编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入仓库编号" v-decorator="['warehouseCode', {rules: [{required: true, message: '请输入仓库编号!'}]}]" /> |
| | | </a-form-item> --> |
| | | <a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <!-- <a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入仓库名称" |
| | | v-decorator="['warehouseName', { rules: [{ required: true, message: '请输入仓库名称!' }] }]" /> |
| | | </a-form-item> |
| | | </a-form-item> --> |
| | | <a-form-item label="库区名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入库区名称" |
| | | v-decorator="['areaName', { rules: [{ required: true, message: '请输入库区名称!' }] }]" /> |
| | |
| | | <!-- <a-form-item label="仓库编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入仓库编号" v-decorator="['warehouseCode', {rules: [{required: true, message: '请输入仓库编号!'}]}]" /> |
| | | </a-form-item> --> |
| | | <a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <!-- <a-form-item label="仓库名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入仓库名称" |
| | | v-decorator="['warehouseName', { rules: [{ required: true, message: '请输入仓库名称!' }] }]" /> |
| | | </a-form-item> |
| | | </a-form-item> --> |
| | | <a-form-item label="库区名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入库区名称" |
| | | v-decorator="['areaName', { rules: [{ required: true, message: '请输入库区名称!' }] }]" /> |
| | |
| | | <a-form-item label="仓库编号"> |
| | | <a-input v-model="queryParam.warehouseCode" allow-clear placeholder="请输入仓库编号"/> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | <a-col :md="8" :sm="24"> |
| | | </a-col> |
| | | <template v-if="advanced"> |
| | | <!-- <a-col :md="8" :sm="24"> |
| | | <a-form-item label="仓库名称"> |
| | | <a-input v-model="queryParam.warehouseName" allow-clear placeholder="请输入仓库名称"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="库区名称"> |
| | | <a-input v-model="queryParam.areaName" allow-clear placeholder="请输入库区名称"/> |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="控制属性规则编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入控制属性规则编号" v-decorator="['ruleCode', {rules: [{required: true, message: '请输入控制属性规则编号!'}]}]" /> |
| | | <a-form-item label="控制属性规则名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入控制属性规则名称" v-decorator="['ruleName', {rules: [{required: true, message: '请输入控制属性规则名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="最高库存" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入最高库存" v-decorator="['maxImumqty']" /> |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="控制属性规则编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入控制属性规则编号" v-decorator="['ruleCode', {rules: [{required: true, message: '请输入控制属性规则编号!'}]}]" /> |
| | | <a-form-item label="控制属性规则名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入控制属性规则名称" v-decorator="['ruleName', {rules: [{required: true, message: '请输入控制属性规则名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="最高库存" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入最高库存" v-decorator="['maxImumqty']" /> |
| | |
| | | this.form.setFieldsValue( |
| | | { |
| | | id: record.id, |
| | | ruleCode: record.ruleCode, |
| | | ruleName: record.ruleName, |
| | | maxImumqty: record.maxImumqty, |
| | | minImumqty: record.minImumqty, |
| | | safeImumqty: record.safeImumqty, |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="控制属性规则名称"> |
| | | <a-input v-model="queryParam.ruleName" allow-clear placeholder="请输入控制属性规则名称"/> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="最高库存"> |
| | | <a-input v-model="queryParam.maxImumqty" allow-clear placeholder="请输入最高库存"/> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="最低库存"> |
| | | <a-input v-model="queryParam.minImumqty" allow-clear placeholder="请输入最低库存"/> |
| | |
| | | dataIndex: 'ruleCode' |
| | | }, |
| | | { |
| | | title: '控制属性规则名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '120px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | customCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '120px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | sorter: true, |
| | | dataIndex: 'ruleName' |
| | | }, |
| | | { |
| | | title: '最高库存', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | |
| | | }, |
| | | created() { |
| | | this.materialTypeDataList() |
| | | const materialTypeOption = this.$options |
| | | this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class_type') |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | stationNameParameterData: [], |
| | | visible: false, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this) |
| | | form: this.$form.createForm(this), |
| | | materialTypeData2:[] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | handleOk() { }, |
| | | // 初始化方法 |
| | | add(record) { |
| | | const materialTypeOption = this.$options |
| | | this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class') |
| | | |
| | | |
| | | this.visible = true |
| | | if (record) {//编辑 |
| | |
| | | BaseCustomerList = this.$refs.addFormBaseCustomer.list |
| | | |
| | | } |
| | | console.log(6666666666666 + '客户档案集合') |
| | | console.log(6666666666666 + '往来关系集合') |
| | | |
| | | // console.log(6666666666666 + '包装关系') |
| | | // console.log(this.$refs.addFormContainerPackagingRef.list) |
| | |
| | | MaterialInput: values, |
| | | ControlRuleld: ControlRuleld, //控制属性 |
| | | SubstituteGoodList: SubstituteGoodList, //替代品 |
| | | BaseCustomerList: BaseCustomerList, //客户档案集合 |
| | | BaseCustomerList: BaseCustomerList, //往来关系集合 |
| | | // ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //包装关系 |
| | | } |
| | | this.confirmLoading = true |
| | |
| | | <template> |
| | | <a-modal |
| | | title="新增客户档案" |
| | | title="新增往来关系" |
| | | :width="900" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户编号" v-decorator="['custCode', {rules: [{required: true, message: '请输入客户编号!'}]}]" /> |
| | | <a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入编号" v-decorator="['custCode', {rules: [{required: true, message: '请输入编号!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入客户中文名称!'}]}]" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入中文名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入助记码" v-decorator="['mnemonicCode']" /> |
| | |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custCode' |
| | | }, |
| | | { |
| | | title: '客户中文名称', |
| | | title: '中文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | <template> |
| | | <a-modal |
| | | title="编辑客户档案" |
| | | title="编辑往来关系" |
| | | :width="900" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户编号" v-decorator="['custCode', {rules: [{required: true, message: '请输入客户编号!'}]}]" /> |
| | | <a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入编号" v-decorator="['custCode', {rules: [{required: true, message: '请输入编号!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入客户中文名称!'}]}]" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName', {rules: [{required: true, message: '请输入中文名称!'}]}]" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="助记码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入助记码" v-decorator="['mnemonicCode']" /> |
| | |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="48"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入客户编号" /> |
| | | <a-form-item label="编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入编号" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入客户中文名称" /> |
| | | <a-form-item label="中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入中文名称" /> |
| | | </a-form-item> |
| | | </a-col><template v-if="advanced"> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入客户英文名称" /> |
| | | <a-form-item label="英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入英文名称" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | |
| | | </a-form-item> |
| | | </a-col><a-col :md="8" :sm="24"> |
| | | <a-form-item label="类型"> |
| | | <a-input-number v-model="queryParam.custType" style="width: 100%" allow-clear |
| | | placeholder="请输入类型" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="类型名称"> |
| | | <a-input v-model="queryParam.custTypeName" allow-clear placeholder="请输入类型名称" /> |
| | | <a-select :allowClear="true" style="width: 100%" v-model="queryParam.custType" |
| | | placeholder="请选择类型"> |
| | | <a-select-option v-for="(item, index) in custTypeData" :key="index" |
| | | :value="item.code">{{ item.name }}</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | |
| | | <a-button type="info" v-if="hasPerm('BaseCustomer:exportExcel')" icon="download" @click="BaseCustomerToExcel()"> |
| | | 导出 |
| | | </a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增客户档案</a-button> |
| | | <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">新增往来关系</a-button> |
| | | </div> --> |
| | | </template> |
| | | <span slot="custTypescopedSlots" slot-scope="text"> |
| | | {{ 'base_customer_type' | dictType(text) }} |
| | | </span> |
| | | <span slot="isDisabledscopedSlots" slot-scope="text"> |
| | | <div v-if="text === true"> |
| | | <a-tag color="green">是</a-tag> |
| | |
| | | </div> |
| | | <div v-else=""></div> |
| | | </span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <!-- <span slot="action" slot-scope="text, record"> |
| | | |
| | | <a v-if="hasPerm('BaseCustomer:edit')" @click="$refs.editForm.edit(record)">编辑</a> |
| | | <a-divider type="vertical" v-if="hasPerm('BaseCustomer:edit') & hasPerm('BaseCustomer:delete')" /> |
| | |
| | | @confirm="() => BaseCustomerDelete(record)"> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </span> --> |
| | | </s-table> |
| | | <add-form ref="addForm" @ok="handleOk" /> |
| | | <edit-form ref="editForm" @ok="handleOk" /> |
| | |
| | | customRender: (text, record, index) => `${index + 1 + (this.pageInfo.current - 1) * this.pageInfo.pageSize}` |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custCode' |
| | | }, |
| | | { |
| | | title: '客户中文名称', |
| | | title: '中文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custChinaName' |
| | | }, |
| | | { |
| | | title: '客户英文名称', |
| | | title: '英文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | customHeaderCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '80px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | customCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '80px'//最小列宽设置 |
| | | } |
| | | } |
| | | }, |
| | | sorter: true, |
| | | dataIndex: 'custType' |
| | | }, |
| | | { |
| | | title: '类型名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | | style: { |
| | | 'min-width': '120px'//最小列宽设置 |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | sorter: true, |
| | | dataIndex: 'custTypeName' |
| | | dataIndex: 'custType', |
| | | scopedSlots: { customRender: 'custTypescopedSlots' } |
| | | }, |
| | | { |
| | | title: '联系人', |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { |
| | | this.columns.push({ |
| | | title: '操作', |
| | | width: '150px', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' } |
| | | }) |
| | | } |
| | | // if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { |
| | | // this.columns.push({ |
| | | // title: '操作', |
| | | // width: '150px', |
| | | // dataIndex: 'action', |
| | | // scopedSlots: { customRender: 'action' } |
| | | // }) |
| | | // } |
| | | const path = this.$route.path |
| | | const columnStr = window.localStorage.getItem(path) |
| | | if (columnStr) { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const custTypeOption = this.$options |
| | | this.custTypeData = custTypeOption.filters['dictData']('base_customer_type') |
| | | const isDisabledOption = this.$options |
| | | this.isDisabledData = isDisabledOption.filters['dictData']('yes_true_false') |
| | | |
| | | this.handleTableHt() //设置主表表格高度 |
| | | window.addEventListener( |
| | | 'resize', |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less"> |
| | | .table-operator { |
| | | <style lang="less">.table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | |
| | | <a-form-item label="客户ID" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户ID" v-decorator="['custId']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户编号" v-decorator="['custCode']" /> |
| | | <a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入编号" v-decorator="['custCode']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName']" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName']" /> |
| | | </a-form-item> |
| | | </a-form> |
| | | </a-spin> |
| | |
| | | <a-form-item label="客户ID" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户ID" v-decorator="['custId']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户编号" v-decorator="['custCode']" /> |
| | | <a-form-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入编号" v-decorator="['custCode']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户英文名称" v-decorator="['custEnglishName']" /> |
| | | <a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入英文名称" v-decorator="['custEnglishName']" /> |
| | | </a-form-item> |
| | | <a-form-item label="客户中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入客户中文名称" v-decorator="['custChinaName']" /> |
| | | <a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入中文名称" v-decorator="['custChinaName']" /> |
| | | </a-form-item> |
| | | <a-form-item v-show="false"><a-input v-decorator="['id']" /></a-form-item> |
| | | </a-form> |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入客户编号"/> |
| | | <a-form-item label="编号"> |
| | | <a-input v-model="queryParam.custCode" allow-clear placeholder="请输入编号"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入客户英文名称"/> |
| | | <a-form-item label="英文名称"> |
| | | <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="请输入英文名称"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="8" :sm="24"> |
| | | <a-form-item label="客户中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入客户中文名称"/> |
| | | <a-form-item label="中文名称"> |
| | | <a-input v-model="queryParam.custChinaName" allow-clear placeholder="请输入中文名称"/> |
| | | </a-form-item> |
| | | </a-col> <!--年月日时分秒--> |
| | | <!--时间范围--> |
| | |
| | | dataIndex: 'custId' |
| | | }, |
| | | { |
| | | title: '客户编号', |
| | | title: '编号', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custCode' |
| | | }, |
| | | { |
| | | title: '客户英文名称', |
| | | title: '英文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | dataIndex: 'custEnglishName' |
| | | }, |
| | | { |
| | | title: '客户中文名称', |
| | | title: '中文名称', |
| | | align: 'center', |
| | | customHeaderCell: () => { |
| | | return { |
| | |
| | | throw Oops.Oh($"导入数据不能为空"); |
| | | } |
| | | //数据是否重复 |
| | | var existExcelItem = inputs.GroupBy(g => new { |
| | | var existExcelItem = inputs.GroupBy(g => new |
| | | { |
| | | g.RuleName |
| | | }) |
| | | .Where(g => g.Count() > 1) |
| | | .Select(s => new { |
| | | .Select(s => new |
| | | { |
| | | s.Key.RuleName |
| | | }).FirstOrDefault(); |
| | | if (existExcelItem != null) |
| | |
| | | public List<BaseCustomerInput> BaseCustomerList { get; set; } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public string UpdatedUserName { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 物料业务信息实体出参--包含物料、物料客户关系、控制属性、替代品 |
| | | /// </summary> |
| | | public class WmsMaterialInfoOutput |
| | | { |
| | | /// <summary> |
| | | /// 物料基础信息 |
| | | /// </summary> |
| | | public WmsMaterialOutput MaterialInfo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 控制属性规则 |
| | | /// </summary> |
| | | public List<WmsControlRuleDetailOutput> ControlRuleDetailList { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 替代品 |
| | | /// </summary> |
| | | public List<WmsSubstituteGoodOutput> SubstituteGoodList { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 往来关系 |
| | | /// </summary> |
| | | public List<BaseCustomerOutput> BaseCustomerList { get; set; } |
| | | } |
| | | } |
| | |
| | | { |
| | | public interface IWmsMaterialService |
| | | { |
| | | Task<WmsMaterialOutput> Get([FromQuery] QueryeWmsMaterialInput input); |
| | | Task<WmsMaterialInfoOutput> Get([FromQuery] QueryeWmsMaterialInput input); |
| | | Task<List<WmsMaterialOutput>> List([FromQuery] WmsMaterialInput input); |
| | | Task<PageResult<WmsMaterialOutput>> Page([FromQuery] WmsMaterialSearch input); |
| | | Task<List<WmsMaterialOutput>> ListNonPageAsync([FromQuery] WmsMaterialSearchNonPage input); |
| | |
| | | private readonly ISysExcelTemplateService _sysExcelTemplateService; |
| | | private readonly static object _lock = new(); |
| | | private readonly IRepository<WmsMaterialCustomer, MasterDbContextLocator> _wmsMaterialCustomerRep; |
| | | private readonly IRepository<BaseCustomer, MasterDbContextLocator> _baseCustomerRep; |
| | | private readonly IRepository<WmsSubstituteGood, MasterDbContextLocator> _wmsSubstituteGoodRep; |
| | | private readonly IRepository<WmsControlRuleDetail, MasterDbContextLocator> _wmsControlRuleDetailRep; |
| | | public WmsMaterialService( |
| | | IRepository<WmsMaterial,MasterDbContextLocator> wmsMaterialRep |
| | | ,IRepository<SysDictType, MasterDbContextLocator> sysDictTypeRep |
| | | ,IRepository<SysDictData, MasterDbContextLocator> sysDictDataRep |
| | | ,ISysExcelTemplateService sysExcelTemplateService |
| | | , IRepository<WmsMaterialCustomer, MasterDbContextLocator> wmsMaterialCustomerRep |
| | | , IRepository<BaseCustomer, MasterDbContextLocator> baseCustomerRep |
| | | , IRepository<WmsSubstituteGood, MasterDbContextLocator> wmsSubstituteGoodRep |
| | | , IRepository<WmsControlRuleDetail, MasterDbContextLocator> wmsControlRuleDetailRep |
| | | ) |
| | | { |
| | | _wmsMaterialRep = wmsMaterialRep; |
| | |
| | | _sysDictDataRep = sysDictDataRep; |
| | | _sysExcelTemplateService = sysExcelTemplateService; |
| | | _wmsMaterialCustomerRep = wmsMaterialCustomerRep; |
| | | _baseCustomerRep = baseCustomerRep; |
| | | _wmsSubstituteGoodRep = wmsSubstituteGoodRep; |
| | | _wmsControlRuleDetailRep = wmsControlRuleDetailRep; |
| | | } |
| | | /// <summary> |
| | | /// 分页查询物料信息 |
| | |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet("WmsMaterial/detail")] |
| | | public async Task<WmsMaterialOutput> Get([FromQuery] QueryeWmsMaterialInput input) |
| | | public async Task<WmsMaterialInfoOutput> Get([FromQuery] QueryeWmsMaterialInput input) |
| | | { |
| | | return (await _wmsMaterialRep.DetachedEntities.FirstOrDefaultAsync(u => u.Id == input.Id)).Adapt<WmsMaterialOutput>(); |
| | | WmsMaterialInfoOutput resultInfo = new WmsMaterialInfoOutput(); |
| | | //获取物料信息 |
| | | var wmsMaterialInfo =(await _wmsMaterialRep.DetachedEntities.FirstOrDefaultAsync(u => u.Id == input.Id)).Adapt<WmsMaterialOutput>(); |
| | | //获取替换物料信息 |
| | | var wmsSubstituteGoods = await _wmsSubstituteGoodRep.DetachedEntities |
| | | .Where(u => u.MaterialCode == wmsMaterialInfo.MaterialName) |
| | | .Where(u => u.IsDeleted == false) |
| | | .Where(u => u.IsDisabled == false) |
| | | .OrderBy(o => o.CreatedTime) |
| | | .ProjectToType<WmsSubstituteGoodOutput>() |
| | | .ToListAsync(); |
| | | //获取控制属性规则 |
| | | var wmsControlRuleDetails = await _wmsControlRuleDetailRep.DetachedEntities |
| | | .Where(u => u.Id == wmsMaterialInfo.ControlRuleId) |
| | | .Where(u => u.IsDeleted == false) |
| | | .Where(u => u.IsDisabled == false) |
| | | .OrderBy(o=>o.CreatedTime) |
| | | .ProjectToType<WmsControlRuleDetailOutput>() |
| | | .ToListAsync(); |
| | | |
| | | //根据物料客户关联表获取往来信息 |
| | | var baseCustomers = await _baseCustomerRep.DetachedEntities.Join(_wmsMaterialCustomerRep.DetachedEntities, bc => bc.Id, mc => mc.CustId, (bc, mc) => new { bc, mc }) |
| | | .Where(p =>p.mc.MaterialId== wmsMaterialInfo.Id) |
| | | .OrderBy(o => o.mc.CreatedTime) |
| | | .ProjectToType<BaseCustomerOutput>() |
| | | .ToListAsync(); |
| | | |
| | | resultInfo.MaterialInfo = wmsMaterialInfo; |
| | | resultInfo.SubstituteGoodList = wmsSubstituteGoods; |
| | | resultInfo.ControlRuleDetailList = wmsControlRuleDetails; |
| | | return resultInfo; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | //替代品信息 |
| | | var substituteGoodList = input.SubstituteGoodList.Adapt<List<WmsSubstituteGood>>(); |
| | | foreach (var item in substituteGoodList) |
| | | { |
| | | item.SubstituteCode = Yitter.IdGenerator.YitIdHelper.NextId().ToString();//TODO 要调用生成 编号的方法 先用雪花ID |
| | | } |
| | | |
| | | wmsMaterial.UpdatedUserId = SysHelper.GetUserId(); |
| | | wmsMaterial.UpdatedUserName = SysHelper.GetUserName(); |
| | |
| | | |
| | | //替代品信息 |
| | | var substituteGoodList = input.SubstituteGoodList.Adapt<List<WmsSubstituteGood>>(); |
| | | foreach (var item in substituteGoodList) |
| | | { |
| | | item.SubstituteCode = Yitter.IdGenerator.YitIdHelper.NextId().ToString();//TODO 要调用生成 编号的方法 先用雪花ID |
| | | } |
| | | |
| | | if (materialCustomerList?.Count > 0) |
| | | { |
| | |
| | | /// </summary> |
| | | [Comment("是否免检")] |
| | | |
| | | public bool IsNotChek { get; set; } |
| | | public bool? IsNotChek { get; set; } |
| | | |
| | | |
| | | /// <summary> |