Kaynağa Gözat

配件资料添加

pengyh 1 yıl önce
ebeveyn
işleme
e8f3633e59

+ 55 - 0
src/api/auxiliaryFittings/attachmentNewReturn.js

@@ -0,0 +1,55 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/websitPartsRet/list/pageV2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/websitPartsRet/pageExport',
+    data,
+    name
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: `/websitPartsRet/add`,
+    method: 'post',
+    data
+  })
+}
+
+// 编辑
+export function edit(data) {
+  return request({
+    url: `/websitPartsRet/update`,
+    method: 'post',
+    data
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/websit/goods/detail`,
+    method: 'post',
+    params
+  })
+}
+
+// 字典数据
+export function getTypeList(data) {
+  return request({
+    url: `/dictCompany/page`,
+    method: 'post',
+    data
+  })
+}

+ 11 - 2
src/api/auxiliaryFittings/attachmentProfile.js

@@ -37,11 +37,11 @@ export function edit(data) {
 }
 
 // 详情
-export function getDetail(data) {
+export function getDetail(params) {
   return request({
     url: `/websit/goods/detail`,
     method: 'post',
-    data
+    params
   })
 }
 
@@ -61,4 +61,13 @@ export function getTypeList(data) {
     method: 'post',
     data
   })
+}
+
+// 字典数据
+export function getCategoryList(params) {
+  return request({
+    url: `/goods/category/list`,
+    method: 'get',
+    params
+  })
 }

+ 55 - 0
src/api/auxiliaryFittings/auxiliarySalesReturnOrder.js

@@ -0,0 +1,55 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/websitSalesRet/list/pageV2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/websitSalesRet/pageExport',
+    data,
+    name
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: `/websitSalesRet/add`,
+    method: 'post',
+    data
+  })
+}
+
+// 编辑
+export function edit(data) {
+  return request({
+    url: `/websitSalesRet/update`,
+    method: 'post',
+    data
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/websit/goods/detail`,
+    method: 'post',
+    params
+  })
+}
+
+// 字典数据
+export function getTypeList(data) {
+  return request({
+    url: `/dictCompany/page`,
+    method: 'post',
+    data
+  })
+}

+ 143 - 44
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -23,7 +23,7 @@ import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport, getTypeList } from "@/api/auxiliaryFittings/attachmentProfile";
+import { listPageV2,pageExport, getDetail, add, edit, updateStatus, listImport, getTypeList, getCategoryList } from "@/api/auxiliaryFittings/attachmentProfile";
 export default {
   components: { TemplatePage, ImageUpload },
   mixins: [import_mixin],
@@ -92,10 +92,21 @@ export default {
       formDialog: false,
       formData: {
 		companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-		partsUnitName: '',
+		goodsType: 'P',
+		goodsStockUnit: '',
+		goodsCode: '',
+		goodsName: '',
+		normType: 'M',
+		stateEnum: 'ON',
 		categoryList: [],
-		partsUnitList: [],
-		brandList: []
+		brandList: [],
+		marketPrice: '',
+		normAmount: '',
+		selfWebsitAmount: '',
+		selfWorkerAmount: '',
+		outWebsitAmount: '',
+		outWorkerAmount: '',
+		remark: ''
       },
 	  partsUnitList: [],
 	  brandList: [],
@@ -157,7 +168,7 @@ export default {
         attributes: { placeholder: '请选择单位',filterable: true, clearable: true },
         formItemAttributes: {
           label: '单位',
-          prop: 'partsUnitName',
+          prop: 'goodsStockUnit',
           rules: [...required]
         },
 		events: {
@@ -182,21 +193,21 @@ export default {
         attributes: {},
         formItemAttributes: {
           label: '收费类型',
-          prop: 'venderType',
+          prop: 'normType',
           rules: [...required]
         },
 		render: (h, { props, onInput }) => {
 			var { value } = props
 			return (
-				<el-radio-group v-model={this.formData.venderType}>
-				    <el-radio disabled={this.formDialogType==2} label="P">配件物料</el-radio>
-					<el-radio disabled={this.formDialogType==2} label="A">服务收费</el-radio>
+				<el-radio-group v-model={this.formData.normType}>
+				    <el-radio disabled={this.formDialogType==2} label="M">配件物料</el-radio>
+					<el-radio disabled={this.formDialogType==2} label="S">服务收费</el-radio>
 				</el-radio-group>
 			)
 		}
       }, {
         md: 24,
-        isShow: true,
+        isShow: this.formData.normType == 'M'?true:false,
         name: 'el-checkbox-add',
 		labelKey: 'dictValue',
 		valueKey: 'dictCode',
@@ -209,10 +220,10 @@ export default {
         }
       }, {
         md: 24,
-        isShow: true,
+        isShow: this.formData.normType == 'M'?true:false,
         name: 'el-checkbox-add',
-		labelKey: 'dictValue',
-		valueKey: 'dictCode',
+		labelKey: 'name',
+		valueKey: 'categoryId',
         attributes: {},
 		options: this.categoryList,
         formItemAttributes: {
@@ -223,63 +234,149 @@ export default {
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '销售价格',
-          prop: 'www',
+          prop: 'marketPrice',
           rules: [...required]
-        }
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.marketPrice} onChange={(e)=>{
+							if(this.formData.selfWorkerAmount > e){
+								this.formData.marketPrice = ''
+								return this.$message.warning('自有库存师傅分账金额必须小于销售价格!');
+							}else if(this.formData.outWorkerAmount > e){
+								this.formData.outWorkerAmount = ''
+								return this.$message.warning('外购辅材师傅分账金额必须小于销售价格!');
+							}
+							this.formData.selfWebsitAmount = e - this.formData.selfWorkerAmount
+							this.formData.outWebsitAmount = e - this.formData.outWorkerAmount
+						}} type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+					<div style="color: #EA8000">注:维护网点销售给师傅的价格</div>
+				</div>
+			)
+		}
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '收费标准',
-          prop: 'email',
-          rules: [...email]
-        }
+          prop: 'normAmount',
+          rules: [...required]
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.normAmount} type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+					<div style="color: #EA8000">注:分账金额需扣除手续费0.6%</div>
+				</div>
+			)
+		}
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '自有库存师傅分账金额',
-          prop: 'telNo',
+          prop: 'selfWorkerAmount',
           rules: [...required]
-        }
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			const that = this
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.selfWorkerAmount} onChange={(e)=>{
+							if(e && (Number(e) > Number(that.formData.marketPrice))){
+								that.formData.selfWorkerAmount = ''
+								return this.$message.warning('自有库存师傅分账金额必须小于销售价格!');
+							}
+							that.formData.selfWebsitAmount = that.formData.marketPrice - e
+						}} type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+				</div>
+			)
+		}
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '外购辅材师傅分账金额',
-          prop: 'faxNo',
+          prop: 'outWorkerAmount',
           rules: [...required]
-        }
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			const that = this
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.outWorkerAmount} onChange={(e)=>{
+							if(Number(e) > Number(that.formData.marketPrice)){
+								this.formData.outWorkerAmount = ''
+								return this.$message.warning('外购辅材师傅分账金额必须小于销售价格!');
+							}
+							this.formData.outWebsitAmount = this.formData.marketPrice - e
+						}} type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+				</div>
+			)
+		}
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '自有库存网点分账金额',
-          prop: 'telNo',
+          prop: 'selfWebsitAmount',
           rules: [...required]
-        }
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.selfWebsitAmount} disabled type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+				</div>
+			)
+		}
       }, {
         md: 12,
         isShow: true,
-        name: 'el-input',
+        name: 'slot-component',
         attributes: { placeholder: '请输入', type: 'number' },
         formItemAttributes: {
           label: '外购辅材网点分账金额',
-          prop: 'faxNo',
+          prop: 'outWebsitAmount',
           rules: [...required]
-        }
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<div style="position: relative;">
+					<div style="display: flex;justify-content: space-around;align-items: center;position: relative;">
+						<el-input v-model={this.formData.outWebsitAmount} disabled type="number" placeholder="请输入"></el-input><span style="margin-left: 10px;">元</span>
+					</div>
+				</div>
+			)
+		}
       }, {
         md: 24,
         isShow: true,
@@ -293,11 +390,6 @@ export default {
       }]
     }
   },
-  created() {
-  	this.getTypeList('PARTS_UNIT','partsUnitList')
-	this.getTypeList('BRAND','brandList')
-	this.getTypeList('PARTS_UNIT','categoryList')
-  },
   methods: {
     // 列表请求函数
 	getList(p) {
@@ -316,6 +408,11 @@ export default {
 		   this[type] = res.data.records
 		})
 	},
+	getCategoryList(){
+		getCategoryList({"type":2}).then(res => {
+		   this.categoryList = res.data
+		})
+	},
     // 列表导出函数
     exportList: pageExport,
     // 表格列解析渲染数据更改
@@ -340,9 +437,11 @@ export default {
       return (
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
-		    getDetail({ id: row.venderId }).then(res => {
-		      Object.assign(this.formData, res.data,{
-				  imageUrl:res.data?.imageUrl?  res.data?.imageUrl?.split(",").map(item=>({url:item})) : []
+		    getDetail({ id: row.goodsId }).then(res => {
+		      Object.assign(this.formData, res.data, {
+				  brandList: res.data.brandList?res.data.brandList:[],
+				  categoryList: res.data.categoryList?res.data.categoryList:[],
+				  
 			  })
 			   console.log(this.formData)
 		      this.formDialogType = 1
@@ -358,6 +457,9 @@ export default {
 	  console.log(this.partsUnitList,this.brandList,this.categoryList)
     },
     openForm() {
+	  this.getTypeList('PARTS_UNIT','partsUnitList')
+	  this.getTypeList('BRAND','brandList')
+	  this.getCategoryList()
       this.formDialog = true;
     },
     formCancel() {
@@ -391,10 +493,7 @@ export default {
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([add, edit][this.formDialogType])({
-			  ...this.formData,
-			  imageUrl:this.formData.imageUrl.map(item=>item.url).join(",")
-		  }).then(res => {
+          ([add, edit][this.formDialogType])(this.formData).then(res => {
             this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
             this.formCancel()
             this.$refs.pageRef.refreshList()

+ 405 - 2
src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue

@@ -1,8 +1,411 @@
 <template>
+	<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+	  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+	  :operation="operation" :exportList="exportList">
+	  
+	  <div slot="moreSearch">
+	    <el-radio-group v-model="goodsType" size="mini" @change="changeType">
+	    	<el-radio-button label="">全部</el-radio-button>
+	    	<el-radio-button label="PAY_NOT_TAKE">待确认</el-radio-button>
+	    	<el-radio-button label="SUBMIT">已确认</el-radio-button>
+	    </el-radio-group>
+	    <br><br>
+	  </div>
+	  
+	  <el-dialog title="" width="1200px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
+	    :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
+	    <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+	      <zj-form-module :title="formDialogTitles[formDialogType]" label-width="160px" :showPackUp="false"
+	        :form-data="formData" :form-items="formItems" :disabled="formDialogType==2">
+	      </zj-form-module>
+	    </zj-form-container>
+	    <div slot="footer" class="dialog-footer">
+			<el-button size="mini" @click="formCancel">取 消</el-button>
+			<el-button size="mini" type="primary" @click="formConfirm()">确定</el-button>
+	    </div>
+	  </el-dialog>
+	</template-page>
 </template>
 
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import { downloadFiles } from '@/utils/util'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { listPageV2,pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+	  	[
+	  		[
+	  			{
+	  				name: '新建',
+	  				click: this.addData
+	  			}
+	  		]
+	  	]
+	  ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ["新增","编辑", "详情"],
+      formDialog: false,
+      formData: {
+		companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+		venderName: '',
+		linkName: '',
+		linkTel: '',
+		address: '',
+		zipNo: '',
+		email: '',
+		www: '',
+		telNO: '',
+		corporation: '',
+		faxNo: '',
+		licenseId: '',
+		khBank: '',
+		bankRow: '',
+		accNo: '',
+		remark: '',
+		stateEnum: 'ON',
+		venderType: 'M',
+		imageUrl: []
+      },
+	  goodsType: ''
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return [{
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', disabled: true },
+        formItemAttributes: {
+          label: '所属商户',
+          prop: 'companyName',
+          rules: [...required]
+        },
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'slot-component',
+        attributes: { },
+        formItemAttributes: {
+          label: '状态',
+          prop: 'stateEnum',
+          rules: [...required]
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<el-radio-group v-model={this.formData.stateEnum}>
+				    <el-radio disabled={this.formDialogType==2} label="ON">上架</el-radio>
+				    <el-radio disabled={this.formDialogType==2} label="OFF">下架</el-radio>
+				</el-radio-group>
+			)
+		}
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入配件名称', },
+        formItemAttributes: {
+          label: '配件名称',
+          prop: 'goodsName',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-select',
+		options: [],
+        attributes: { placeholder: '请选择单位' },
+        formItemAttributes: {
+          label: '单位',
+          prop: 'partsUnitName',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入配件代码' },
+        formItemAttributes: {
+          label: '配件代码',
+          prop: 'goodsCode',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'slot-component',
+        attributes: {},
+        formItemAttributes: {
+          label: '收费类型',
+          prop: 'venderType',
+          rules: [...required]
+        },
+		render: (h, { props, onInput }) => {
+			var { value } = props
+			return (
+				<el-radio-group v-model={this.formData.venderType}>
+				    <el-radio disabled={this.formDialogType==2} label="P">配件物料</el-radio>
+					<el-radio disabled={this.formDialogType==2} label="A">服务收费</el-radio>
+				</el-radio-group>
+			)
+		}
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-radio',
+        attributes: {},
+		options: [{
+			label: `通用`,
+			value: "通用"
+		},
+		{
+			label: `格力`,
+			value: "格力"
+		},{
+			label: `美的`,
+			value: "美的"
+		},
+		{
+			label: `海尔`,
+			value: "海尔"
+		},
+		{
+			label: `华凌`,
+			value: "华凌"
+		}],
+        formItemAttributes: {
+          label: '适用品牌',
+          prop: 'address',
+          rules: [...required]
+        }
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-radio',
+        attributes: {},
+		options: [{
+			label: `通用`,
+			value: "通用"
+		},
+		{
+			label: `家用空调`,
+			value: "家用空调"
+		}],
+        formItemAttributes: {
+          label: '适用产品大类',
+          prop: 'zipNo',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '销售价格',
+          prop: 'www',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '收费标准',
+          prop: 'email',
+          rules: [...email]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '自有库存师傅分账金额',
+          prop: 'telNo',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '外购辅材师傅分账金额',
+          prop: 'faxNo',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '自有库存网点分账金额',
+          prop: 'telNo',
+          rules: [...required]
+        }
+      }, {
+        md: 12,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入', type: 'number' },
+        formItemAttributes: {
+          label: '外购辅材网点分账金额',
+          prop: 'faxNo',
+          rules: [...required]
+        }
+      }, {
+        md: 24,
+        isShow: true,
+        name: 'el-input',
+        attributes: { placeholder: '请输入备注内容',type: "textarea", rows: 5 },
+        formItemAttributes: {
+          label: '备注',
+          prop: 'remark',
+          rules: []
+        }
+      }]
+    }
+  },
+  methods: {
+	// 切换状态
+	changeType(val) {
+	  this.$refs.pageRef.refreshList()
+	},
+    // 列表请求函数
+	getList(p) {
+	  try {
+	    var pam = JSON.parse(JSON.stringify(p))
+	    if (this.examineStatus) {
+	      pam.params.push({ "param": "b.examine_status", "compare": "=", "value": this.examineStatus })
+	    }
+	    return listPageV2(pam)
+	  } catch (error) {
+	    console.log(error)
+	  }
+	},
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+		if (item.jname === 'idCardImg') {
+		        defaultData.render = (h, { row, index, column }) => {
+		          return (
+		            <div style="padding:0 6px;cursor: pointer;">
+		              {row.idCardImg ? row.idCardImg.split(",").map(url => <el-image src={url} preview-src-list={[url]} fit="fit" style="width:80px;height:80px;" />) : null}
+		            </div>
+		          )
+		        }
+		      }
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+		  <el-button type="text" onClick={() => {
+		    getDetail({ id: row.venderId }).then(res => {
+		      Object.assign(this.formData, res.data,{
+				  imageUrl:res.data?.imageUrl?  res.data?.imageUrl?.split(",").map(item=>({url:item})) : []
+			  })
+			   console.log(this.formData)
+		      this.formDialogType = 1
+		      this.openForm()
+		    })
+		  }}>编辑</el-button>
+        </div>
+      )
+    },
+    addData() {
+      this.formDialogType = 0
+      this.openForm()
+    },
+    openForm() {
+      this.formDialog = true;
+    },
+    formCancel() {
+      this.$refs.formRef.$refs.inlineForm.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+	updateStatus(stateEnum){
+		if(this.recordSelected.length == 0){
+			return this.$message.warning('请至少勾选一条数据!');
+		}
+		console.log(this.recordSelected)
+		this.$confirm(`请确认是否${stateEnum=='OFF'?'下架':'上架'}该配件, 是否继续?`, '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		}).then(() => {
+			memberInner({
+				stateEnum,
+				ids: this.recordSelected.map(item=>{return item.goodsId}).join(',')
+			}).then(res => {
+				if (res.code == 200) {
+					this.$message({ type: 'success', message: `${stateEnum=='ON'?'下架':'上架'}成功!` })
+					this.$refs.pageRef.refreshList()
+				} else {
+					this.$message.error(res.msg);
+				}
+			})
+		});
+	},
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          ([add, edit][this.formDialogType])({
+			  ...this.formData,
+			  imageUrl:this.formData.imageUrl.map(item=>item.url).join(",")
+		  }).then(res => {
+            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
+    },
+	// 下载导入模版
+	handleDownload() {
+	  // downloadFiles('charging/standard/download');
+	},
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>

+ 8 - 0
src/views/auxiliaryFittings/salesManagement/attachmentOldReturn/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 34 - 255
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -1,42 +1,35 @@
 <template>
-	<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
-	  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-	  :operation="operation" :exportList="exportList">
-	  
-	  <div slot="moreSearch">
-	    <el-radio-group v-model="goodsType" size="mini" @change="changeType">
-	    	<el-radio-button label="">全部</el-radio-button>
-	    	<el-radio-button label="PAY_NOT_TAKE">已支付</el-radio-button>
-	    	<el-radio-button label="SUBMIT">未支付</el-radio-button>
-	    	<el-radio-button label="PAY_TAKE">已提货</el-radio-button>
-	    </el-radio-group>
-	    <br><br>
-	  </div>
-	  
-	  <el-dialog title="" width="1200px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
-	    :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
-	    <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-	      <zj-form-module :title="formDialogTitles[formDialogType]" label-width="160px" :showPackUp="false"
-	        :form-data="formData" :form-items="formItems" :disabled="formDialogType==2">
-	      </zj-form-module>
-	    </zj-form-container>
-	    <div slot="footer" class="dialog-footer">
-			<el-button size="mini" @click="formCancel">取 消</el-button>
-			<el-button size="mini" type="primary" @click="formConfirm()">确定</el-button>
-	    </div>
-	  </el-dialog>
-	</template-page>
+	<div class="page">
+		<template-page v-show="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+		  :operation="operation" :exportList="exportList">
+		  
+		  <div slot="moreSearch">
+		    <el-radio-group v-model="goodsType" size="mini" @change="changeType">
+		    	<el-radio-button label="">全部</el-radio-button>
+		    	<el-radio-button label="PAY_NOT_TAKE">已支付</el-radio-button>
+		    	<el-radio-button label="SUBMIT">未支付</el-radio-button>
+		    	<el-radio-button label="PAY_TAKE">已提货</el-radio-button>
+		    </el-radio-group>
+		    <br><br>
+		  </div>
+		</template-page>
+		<div class="detail" v-if="formDialog">
+			<auxiliarySalesOrderDetail :id="id" :formData="formData" @back="backList" :title="'辅材销售订单' + formDialogTitles[formDialogType]"></auxiliarySalesOrderDetail>
+		</div>
+	</div>
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
+import auxiliarySalesOrderDetail from '../components/auxiliarySalesOrderDetail.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { listPageV2,pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 export default {
-  components: { TemplatePage, ImageUpload },
+  components: { TemplatePage, ImageUpload, auxiliarySalesOrderDetail },
   mixins: [import_mixin],
   data() {
     return {
@@ -66,27 +59,8 @@ export default {
       formDialogType: 0,
       formDialogTitles: ["新增","编辑", "详情"],
       formDialog: false,
-      formData: {
-		companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-		venderName: '',
-		linkName: '',
-		linkTel: '',
-		address: '',
-		zipNo: '',
-		email: '',
-		www: '',
-		telNO: '',
-		corporation: '',
-		faxNo: '',
-		licenseId: '',
-		khBank: '',
-		bankRow: '',
-		accNo: '',
-		remark: '',
-		stateEnum: 'ON',
-		venderType: 'M',
-		imageUrl: []
-      },
+      formData: {},
+	  id: '',
 	  goodsType: ''
     }
   },
@@ -95,211 +69,18 @@ export default {
     moreParameters() {
       return []
     },
-    formItems() {
-      return [{
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', disabled: true },
-        formItemAttributes: {
-          label: '所属商户',
-          prop: 'companyName',
-          rules: [...required]
-        },
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'slot-component',
-        attributes: { },
-        formItemAttributes: {
-          label: '状态',
-          prop: 'stateEnum',
-          rules: [...required]
-        },
-		render: (h, { props, onInput }) => {
-			var { value } = props
-			return (
-				<el-radio-group v-model={this.formData.stateEnum}>
-				    <el-radio disabled={this.formDialogType==2} label="ON">上架</el-radio>
-				    <el-radio disabled={this.formDialogType==2} label="OFF">下架</el-radio>
-				</el-radio-group>
-			)
-		}
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入配件名称', },
-        formItemAttributes: {
-          label: '配件名称',
-          prop: 'goodsName',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-select',
-		options: [],
-        attributes: { placeholder: '请选择单位' },
-        formItemAttributes: {
-          label: '单位',
-          prop: 'partsUnitName',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入配件代码' },
-        formItemAttributes: {
-          label: '配件代码',
-          prop: 'goodsCode',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'slot-component',
-        attributes: {},
-        formItemAttributes: {
-          label: '收费类型',
-          prop: 'venderType',
-          rules: [...required]
-        },
-		render: (h, { props, onInput }) => {
-			var { value } = props
-			return (
-				<el-radio-group v-model={this.formData.venderType}>
-				    <el-radio disabled={this.formDialogType==2} label="P">配件物料</el-radio>
-					<el-radio disabled={this.formDialogType==2} label="A">服务收费</el-radio>
-				</el-radio-group>
-			)
-		}
-      }, {
-        md: 24,
-        isShow: true,
-        name: 'el-radio',
-        attributes: {},
-		options: [{
-			label: `通用`,
-			value: "通用"
-		},
-		{
-			label: `格力`,
-			value: "格力"
-		},{
-			label: `美的`,
-			value: "美的"
-		},
-		{
-			label: `海尔`,
-			value: "海尔"
-		},
-		{
-			label: `华凌`,
-			value: "华凌"
-		}],
-        formItemAttributes: {
-          label: '适用品牌',
-          prop: 'address',
-          rules: [...required]
-        }
-      }, {
-        md: 24,
-        isShow: true,
-        name: 'el-radio',
-        attributes: {},
-		options: [{
-			label: `通用`,
-			value: "通用"
-		},
-		{
-			label: `家用空调`,
-			value: "家用空调"
-		}],
-        formItemAttributes: {
-          label: '适用产品大类',
-          prop: 'zipNo',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '销售价格',
-          prop: 'www',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '收费标准',
-          prop: 'email',
-          rules: [...email]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '自有库存师傅分账金额',
-          prop: 'telNo',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '外购辅材师傅分账金额',
-          prop: 'faxNo',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '自有库存网点分账金额',
-          prop: 'telNo',
-          rules: [...required]
-        }
-      }, {
-        md: 12,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入', type: 'number' },
-        formItemAttributes: {
-          label: '外购辅材网点分账金额',
-          prop: 'faxNo',
-          rules: [...required]
-        }
-      }, {
-        md: 24,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入备注内容',type: "textarea", rows: 5 },
-        formItemAttributes: {
-          label: '备注',
-          prop: 'remark',
-          rules: []
-        }
-      }]
-    }
+    formItems() {}
   },
   methods: {
 	// 切换状态
 	changeType(val) {
 	  this.$refs.pageRef.refreshList()
 	},
+	backList() {
+		this.formData = {};
+		this.formDialog = false;
+		this.getList()
+	},
     // 列表请求函数
 	getList(p) {
 	  try {
@@ -337,9 +118,7 @@ export default {
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
 		    getDetail({ id: row.venderId }).then(res => {
-		      Object.assign(this.formData, res.data,{
-				  imageUrl:res.data?.imageUrl?  res.data?.imageUrl?.split(",").map(item=>({url:item})) : []
-			  })
+		      Object.assign(this.formData, res.data)
 			   console.log(this.formData)
 		      this.formDialogType = 1
 		      this.openForm()
@@ -386,10 +165,7 @@ export default {
     formConfirm() {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
-          ([add, edit][this.formDialogType])({
-			  ...this.formData,
-			  imageUrl:this.formData.imageUrl.map(item=>item.url).join(",")
-		  }).then(res => {
+          ([add, edit][this.formDialogType])(this.formData).then(res => {
             this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
             this.formCancel()
             this.$refs.pageRef.refreshList()
@@ -406,6 +182,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+	.page{
+		height: 100%;
+	}
 	.tab{
 		padding: 20px 20px 0 20px;
 	}

+ 129 - 2
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -1,8 +1,135 @@
 <template>
+	<div class="page">
+		<template-page v-if="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="50"
+		  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+		  :operation="operation" :exportList="exportList">
+		  
+		  <div slot="moreSearch">
+		    <el-radio-group v-model="goodsType" size="mini" @change="changeType">
+		    	<el-radio-button label="">全部</el-radio-button>
+		    	<el-radio-button label="PAY_NOT_TAKE">待确认</el-radio-button>
+		    	<el-radio-button label="SUBMIT">已确认</el-radio-button>
+		    </el-radio-group>
+		    <br><br>
+		  </div>
+		</template-page>
+		<div class="detail" v-if="formDialog">
+			<auxiliarySalesOrderDetail :id="id" @back="backList" :title="'辅材销售订单' + formDialogTitles[formDialogType]"></auxiliarySalesOrderDetail>
+		</div>
+	</div>
 </template>
 
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import auxiliarySalesOrderDetail from '../components/auxiliarySalesOrderDetail.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import { downloadFiles } from '@/utils/util'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { listPageV2,pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
+export default {
+  components: { TemplatePage, ImageUpload, auxiliarySalesOrderDetail },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+	  	[
+	  		[
+	  			{
+	  				name: '新建',
+	  				click: this.addData
+	  			}
+	  		]
+	  	]
+	  ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ["新增","编辑", "详情"],
+      formDialog: false,
+	  id: '',
+	  goodsType: ''
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {}
+  },
+  methods: {
+	// 切换状态
+	changeType(val) {
+	  this.$refs.pageRef.refreshList()
+	},
+	backList() {
+		this.formDialog = false;
+		this.getList()
+	},
+    // 列表请求函数
+	getList(p) {
+	  try {
+	    var pam = JSON.parse(JSON.stringify(p))
+	    if (this.examineStatus) {
+	      pam.params.push({ "param": "b.examine_status", "compare": "=", "value": this.examineStatus })
+	    }
+	    return listPageV2(pam)
+	  } catch (error) {
+	    console.log(error)
+	  }
+	},
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {},
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+		  <el-button type="text" onClick={() => {
+			this.id = row.salesRetId
+			this.formDialogType = 1
+			this.openForm()
+		  }}>编辑</el-button>
+        </div>
+      )
+    },
+    addData() {
+      this.formDialogType = 0
+      this.openForm()
+    },
+    openForm() {
+      this.formDialog = true;
+    },
+	// 下载导入模版
+	handleDownload() {
+	  // downloadFiles('charging/standard/download');
+	},
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+	.page{
+		height: 100%;
+	}
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>

+ 50 - 0
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -0,0 +1,50 @@
+<template>
+	<div class="s-page">
+		<el-page-header @back="goBack" :content="title"></el-page-header>
+		<el-divider></el-divider>
+		<div class="mymain-container">
+			<el-form ref="formData" :model="formData" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20" justify="start">
+					<el-col :span="6">
+						<el-form-item label="广佛信息编号">
+							<el-input type="text" value="" readonly="readonly"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</div>
+		<el-row :gutter="20" justify="end" type="flex">
+			<el-button v-if="true" type="primary" @click="confirm()">提交</el-button>
+			<el-button v-if="true" size="small" type="danger">确认收货</el-button>
+			<el-button size="small" type="info" @click="goBack">返回</el-button>
+		</el-row>
+	</div>
+</template>
+
+<script>
+	export default {
+		props: ['id','title'],
+		data() {
+			return {
+				
+			};
+		},
+		computed: {},
+		created() {
+			
+		},
+		methods: {
+			// 返回
+			goBack() {
+				this.$emit('back');
+			}
+		}
+	};
+</script>
+
+<style scoped="scoped" lang="scss">
+	.s-page {
+		padding: 20px;
+		background-color: #ffffff;
+	}
+</style>

+ 1 - 1
src/views/setting/dataDictionary/index.vue

@@ -13,7 +13,7 @@
 		     </zj-page-container>
 		 </div>
 		 <template-page ref="pageRef" :getList="getList" :columnParsing="columnParsing" :optionsEvensGroup="optionsEvensGroup"
-		   :tableAttributes="tableAttributes" :tableEvents="tableEvents" :operationColumnWidth="160" :operation="operation()">
+		   :tableAttributes="tableAttributes" :tableEvents="tableEvents" :operationColumnWidth="160" :operation="operation()" :exportList="exportList">
 		   <!-- <AddDataDictionary :visible="visible" :item="item" @setVisible="bool => {
 		     visible = bool
 		     if (!bool && item) {