pengyh 1 год назад
Родитель
Сommit
4184d51b56

+ 79 - 0
src/api/auxiliaryFittings/auxiliaryAdjustPriceOrder.js

@@ -0,0 +1,79 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/websit/goods/price/upd/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/websit/goods/price/upd/list/export',
+    data,
+    name
+  })
+}
+
+// 新增
+export function add(data) {
+  return request({
+    url: `/websit/goods/price/add`,
+    method: 'post',
+    data
+  })
+}
+
+// 编辑
+export function edit(data) {
+  return request({
+    url: `/websit/goods/price/edit`,
+    method: 'post',
+    data
+  })
+}
+
+// 详情
+export function getDetail(data) {
+  return request({
+    url: `/websit/goods/price/detail`,
+    method: 'post',
+    data
+  })
+}
+
+// 上下架
+export function confirm(data) {
+  return request({
+    url: `/websit/goods/price/confirm`,
+    method: 'post',
+    data
+  })
+}
+
+export function getWorker(data) {
+  return request({
+    url: `/member/list/page2`,
+    method: 'post',
+    data
+  })
+}
+
+export function getCategory(params) {
+  return request({
+    url: `/websit/sales/exist/stock/category`,
+    method: 'post',
+    params
+  })
+}
+
+export function getGoods(params) {
+  return request({
+    url: `/websit/sales/exist/stock/goods`,
+    method: 'post',
+    params
+  })
+}

+ 24 - 0
src/api/auxiliaryFittings/auxiliarySalesOrder.js

@@ -52,4 +52,28 @@ export function submit(data) {
     method: 'post',
     data
   })
+}
+
+export function getWorker(data) {
+  return request({
+    url: `/member/list/page2`,
+    method: 'post',
+    data
+  })
+}
+
+export function getCategory(params) {
+  return request({
+    url: `/websit/sales/exist/stock/category`,
+    method: 'post',
+    params
+  })
+}
+
+export function getGoods(params) {
+  return request({
+    url: `/websit/sales/exist/stock/goods`,
+    method: 'post',
+    params
+  })
 }

+ 28 - 0
src/api/auxiliaryFittings/settleAccountManagement.js

@@ -0,0 +1,28 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/settlementOrder/list/pageV2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/settlementOrder/pageExport',
+    data,
+    name
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/settlementOrder/detail`,
+    method: 'post',
+    params
+  })
+}

+ 19 - 0
src/api/auxiliaryFittings/transaction.js

@@ -0,0 +1,19 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPageV2(data) {
+  return request({
+    url: `/websit/trade/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/websit/trade/list/export',
+    data,
+    name
+  })
+}

+ 1 - 5
src/api/dataDictionary.js

@@ -105,9 +105,5 @@ export function getDetail(data) {
 }
 
 export function listImport(data) {
-  return request({
-    url: `/dictCompany/importExcel`,
-    method: 'post',
-    data
-  })
+	return handleImport('/dictCompany/importExcel', data.formdata, data.id || '')
 }

+ 146 - 0
src/views/auxiliaryFittings/salesManagement/auxiliaryAdjustPriceOrder/index.vue

@@ -0,0 +1,146 @@
+<template>
+	<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-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, confirm } from "@/api/auxiliaryFittings/auxiliaryAdjustPriceOrder";
+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) {
+		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={() => {
+				this.id = row.sales_id
+		    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 lang="scss" scoped>
+	.page{
+		height: 100%;
+	}
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>

+ 4 - 48
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -15,7 +15,7 @@
 		  </div>
 		</template-page>
 		<div class="detail" v-if="formDialog">
-			<auxiliarySalesOrderDetail :id="id" :formData="formData" @back="backList" :title="'辅材销售订单' + formDialogTitles[formDialogType]"></auxiliarySalesOrderDetail>
+			<auxiliarySalesOrderDetail :id="id" @back="backList" :title="'辅材销售订单' + formDialogTitles[formDialogType]"></auxiliarySalesOrderDetail>
 		</div>
 	</div>
 </template>
@@ -59,7 +59,6 @@ export default {
       formDialogType: 0,
       formDialogTitles: ["新增","编辑", "详情"],
       formDialog: false,
-      formData: {},
 	  id: '',
 	  goodsType: ''
     }
@@ -77,7 +76,6 @@ export default {
 	  this.$refs.pageRef.refreshList()
 	},
 	backList() {
-		this.formData = {};
 		this.formDialog = false;
 		this.getList()
 	},
@@ -117,12 +115,9 @@ export default {
       return (
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
-		    getDetail({ id: row.venderId }).then(res => {
-		      Object.assign(this.formData, res.data)
-			   console.log(this.formData)
-		      this.formDialogType = 1
-		      this.openForm()
-		    })
+				this.id = row.sales_id
+		    this.formDialogType = 1
+		    this.openForm()
 		  }}>编辑</el-button>
         </div>
       )
@@ -134,45 +129,6 @@ export default {
     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).then(res => {
-            this.$message({ type: 'success', message: `${this.formDialogTitles[this.formDialogType]}成功!` })
-            this.formCancel()
-            this.$refs.pageRef.refreshList()
-          })
-        }
-      })
-    },
 	// 下载导入模版
 	handleDownload() {
 	  // downloadFiles('charging/standard/download');

+ 199 - 33
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -1,34 +1,41 @@
 <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-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="formItems1" :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 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 },
+  components: { TemplatePage, ImageUpload },
   mixins: [import_mixin],
   data() {
     return {
@@ -58,7 +65,28 @@ export default {
       formDialogType: 0,
       formDialogTitles: ["新增","编辑", "详情"],
       formDialog: false,
-	  id: '',
+      formData: {
+        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+        "companyWechatId": "",
+        "confirmBy": "",
+        "confirmTime": "",
+        "createBy": "",
+        "createTime": "",
+        "flag": "",
+        "goodsType": "",
+        "purchaseId": "",
+        "purchaseTime": "",
+        "remark": "",
+        "totalAmount": 0,
+        "updateBy": "",
+        "updateTime": "",
+        "venderId": "",
+        "venderName": "",
+        "websitId": "",
+        "websitName": "",
+        items: [],
+        imageUrl: []
+      },
 	  goodsType: ''
     }
   },
@@ -67,17 +95,100 @@ export default {
     moreParameters() {
       return []
     },
-    formItems() {}
+    formItems1() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }}>
+                  <el-descriptions-item label="单据状态">
+                    {({ SAVE: "保存", OK: "通过", FAIL: "失败" })[this.formData.flag]}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="单据编号">
+                    {(!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType) ? this.formData.purchaseId : this.formData.purchaseRetId) || ''}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="所属商户" contentStyle={{ width: '42%' }}>
+                    {this.formData.companyWechatName}
+                  </el-descriptions-item>
+                </el-descriptions>
+                <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="网点名称">
+                    <el-select style="width:100%" value={this.formData.websitId} onInput={(val) => { this.formData.websitId = val }} placeholder="请选择">
+                      {this.getWebsitList.map(item => <el-option key={item.websitId} label={item.name} value={item.websitId}></el-option>)}
+                    </el-select>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="供应商名称">
+                    <el-select style="width:100%" value={this.formData.venderId} onInput={(val) => { this.formData.venderId = val }} placeholder="请选择">
+                      {this.listPageV2Data.map(item => <el-option key={item.venderId} label={item.venderName} value={item.venderId}></el-option>)}
+                    </el-select>
+                  </el-descriptions-item>
+                </el-descriptions>
+                {
+                  !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType) ?
+                    <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                      <el-descriptions-item label="采购入库单号" contentStyle={{ width: '42%' }}>
+                        {this.formData.purchaseId}
+                      </el-descriptions-item>
+                      <el-descriptions-item label="退货数量">
+                        {this.formData.retTotalQty}
+                      </el-descriptions-item>
+                      <el-descriptions-item label="退款金额">
+                        {this.formData.retTotalAmount}
+                      </el-descriptions-item>
+                    </el-descriptions> : null
+                }
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="制单人">
+                    {this.formData.createBy}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="制单时间">
+                    {this.formData.createTime}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="审核人">
+                    {this.formData.confirmBy}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="审核时间">
+                    {this.formData.confirmTime}
+                  </el-descriptions-item>
+                </el-descriptions>
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="附件">
+                    <ImageUpload fileList={this.formData.imageUrl} uid="imgSrc666_materials_drawing_images" limit={1} isEdit={this.formDialogType < 2} />
+                  </el-descriptions-item>
+                  <el-descriptions-item label="备注" contentStyle={{ width: '67%' }}>
+                    <el-input
+                      type="textarea"
+                      placeholder="请输入内容"
+                      value={this.formData.remark}
+                      onInput={(val) => { this.formData.remark = val }}
+                      maxlength="200"
+                      show-word-limit
+                      autosize={{ minRows: 6, maxRows: 8 }}
+                    >
+                    </el-input>
+                  </el-descriptions-item>
+                </el-descriptions>
+              </div>
+            )
+          }
+        },]
+    },
   },
   methods: {
 	// 切换状态
 	changeType(val) {
 	  this.$refs.pageRef.refreshList()
 	},
-	backList() {
-		this.formDialog = false;
-		this.getList()
-	},
     // 列表请求函数
 	getList(p) {
 	  try {
@@ -93,7 +204,18 @@ export default {
     // 列表导出函数
     exportList: pageExport,
     // 表格列解析渲染数据更改
-    columnParsing(item, defaultData) {},
+    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
@@ -103,9 +225,14 @@ export default {
       return (
         <div class='operation-btns'>
 		  <el-button type="text" onClick={() => {
-			this.id = row.salesRetId
-			this.formDialogType = 1
-			this.openForm()
+		    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>
       )
@@ -117,6 +244,48 @@ export default {
     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');
@@ -126,9 +295,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	.page{
-		height: 100%;
-	}
 	.tab{
 		padding: 20px 20px 0 20px;
 	}

+ 287 - 17
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -2,41 +2,278 @@
 	<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>
+		<el-card class="box-card">
+			<div slot="header" class="clearfix">
+				<span>单据信息</span>
+			</div>
+			<div class="mymain-container">
+				<el-form ref="formData" :rules="rules" :model="formData" label-width="110px" size="small" label-position="left">
+					<el-row :gutter="20" justify="start">
+						<el-col :span="12">
+							<el-form-item label="所属商户" :required="true" >
+								<el-input type="text" :value="companyName" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="网点名称" prop="websitId" :required="true">
+								<el-select v-model="formData.websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
+								    <el-option
+								      v-for="item in websitList"
+								      :key="item.websitId"
+								      :label="item.name"
+								      :value="item.websitId">
+								    </el-option>
+								  </el-select>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
+							<el-form-item label="师傅姓名" prop="worker" :required="true">
+								<el-select v-model="formData.worker" @focus="()=>{
+									if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
+								}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
+								    <el-option
+								      v-for="item in workerList"
+								      :key="item.id"
+								      :label="item.nickName"
+								      :value="item.nickName">
+								    </el-option>
+								  </el-select>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
+							<el-form-item label="师傅身份证" prop="idcard" :required="true">
+								<el-input type="text" v-model="formData.idcard" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
+							<el-form-item label="师傅联系电话" prop="phone" :required="true">
+								<el-input type="text" v-model="formData.phone" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="订单来源" prop="source" :required="true">
+								<el-select v-model="formData.source" placeholder="请选择" style="width: 100%;">
+								    <el-option
+								      v-for="item in [{name: '在线订单',id: 'ONLINE'},{name: '自建订单',id: 'SELF'}]"
+								      :key="item.workerId"
+								      :label="item.name"
+								      :value="item.workerId">
+								    </el-option>
+								  </el-select>
+							</el-form-item>
+						</el-col>
+						<el-col :span="9">
+							<el-form-item label="支付方式" prop="payType" :required="true">
+								<el-select v-model="formData.payType" placeholder="请选择" style="width: 100%;">
+								    <el-option
+								      v-for="item in [{name: '现金',id: 'CASH'},{name: '微信',id: 'WECHAT'}]"
+								      :key="item.id"
+								      :label="item.name"
+								      :value="item.id">
+								    </el-option>
+								  </el-select>
+							</el-form-item>
+						</el-col>
+						<el-col :span="3" v-if="formData.payType == 'WECHAT'">
+							<div style="height: 32px;display: flex;align-items: center;cursor: pointer;">微信支付<i class="el-icon-full-screen"></i></div>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="备注">
+								<el-input type="textarea" :rows="4" v-model="formData.remark" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form>
+			</div>
+		</el-card>
+		<el-card class="box-card">
+			<div slot="header" class="clearfix">
+				<span>辅材信息</span>
+			</div>
+			<el-button size="small" type="primary" @click="add()">添加</el-button>
+			<div class="table">
+				<el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+					<el-table-column label="大类名称" align="center">
+						<template slot-scope="scope">
+							<el-select v-model="scope.row.productCategory" value-key="categoryId" @change="changeMain" :disabled="isEdit != scope.$index" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in mainList"
+							      :key="item.categoryId"
+							      :label="item.categoryName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</template>
+					</el-table-column>
+					<el-table-column label="小类名称" align="center">
+						<template slot-scope="scope">
+							<el-select v-model="scope.row.goodsCategory" @change="changeSmall" @focus="()=>{
+									if(!scope.row.productCategory){return this.$message.warning('请先选择大类!');}
+								}" :disabled="isEdit != scope.$index" value-key="categoryId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in smallList"
+							      :key="item.categoryId"
+							      :label="item.categoryName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</template>
+					</el-table-column>
+					<el-table-column label="辅材名称" align="center">
+						<template slot-scope="scope">
+							<el-select v-model="scope.row.goodsId" :disabled="isEdit != scope.$index" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in materialsList"
+							      :key="item.id"
+							      :label="item.name"
+							      :value="item.id">
+							    </el-option>
+							  </el-select>
+						</template>
+					</el-table-column>
+					<el-table-column prop="goodsSalesUnit" align="center" label="单位" ></el-table-column>
+					<el-table-column prop="" align="center" label="数量" >
+						<template slot-scope="scope">
+							<el-input type="number" v-model="scope.row.salesQty" :disabled="isEdit != scope.$index" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
+					<el-table-column prop="" align="center" label="商品代码"></el-table-column>
+					<el-table-column prop="" align="center" label="规格型号"></el-table-column>
+					<el-table-column prop="" align="center" label="销售价格"></el-table-column>
+					<el-table-column prop="" align="center" label="销售金额"></el-table-column>
+					<el-table-column prop="" align="center" label="库存数量"></el-table-column>
+					<el-table-column label="操作" align="right" width="140">
+						<template slot-scope="scope">
+							<el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index">编辑</el-button>
+							<el-button size="mini" type="danger" @click="dataList.splice(scope.$index,1)">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+			</div>
+		</el-card>
+		<div class="page-footer">
+			<div class="footer">
+				<el-button v-if="true" size="small" 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>
+			</div>
 		</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>
+	import { getWebsit } from "@/api/customerManagement";
+	import { getWorker, getCategory, getGoods } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	export default {
 		props: ['id','title'],
 		data() {
 			return {
-				
+				dataList: [],
+				websitList: [],
+				workerList: [],
+				mainList: [],
+				smallList: [],
+				materialsList: [],
+				formData: {
+					websitId: '',
+					worker: '',
+					idcard: '',
+					phone: '',
+					source: ''
+				},
+				productCategory: {},
+				goodsCategory: {},
+				isEdit: 0,
+				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+				rules: {
+					websitId: [
+						{ required: true, message: '请选择网点', trigger: 'change' }
+					],
+					worker: [
+						{ required: true, message: '请选择师傅', trigger: 'change' }
+					],
+					source: [
+						{ required: true, message: '请选择订单来源', trigger: 'change' }
+					],
+					payType: [
+						{ required: true, message: '请选择订单来源', trigger: 'change' }
+					],
+					idcard: [
+						{ required: true, message: '请输入师傅身份证', trigger: 'blur' },
+					],
+					phone: [
+						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
+					],
+				}
 			};
 		},
 		computed: {},
 		created() {
-			
+			this.getWebsit()
 		},
 		methods: {
 			// 返回
 			goBack() {
 				this.$emit('back');
+			},
+			getWebsit(){
+				getWebsit().then(res => {
+					this.websitList = res.data
+				})
+			},
+			changeWebsit(websitId){
+				this.getWorker()
+				getCategory({websitId}).then(res => {
+					this.mainList = res.data
+				})
+			},
+			getWorker(name){
+				const that = this
+				getWorker({pageNum: 1,pageSize: -1,params: [{param: 'a.nick_name',compare: '=',value: name},{param: 'b.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
+					if(name){
+						that.formData.idcard = res.data.records[0].idCard
+						that.formData.phone = res.data.records[0].mobile
+					}else{
+						this.workerList = res.data.records
+					}
+				})
+			},
+			changeWorker(e){
+				this.getWorker(e)
+			},
+			workerBlur(e){
+				this.formData.worker = e.target.value
+				this.$forceUpdate()
+			},
+			changeMain(e){
+				this.dataList[this.isEdit].goodsCategoryId = ''
+				this.dataList[this.isEdit].goodsCategoryName = ''
+				this.dataList[this.isEdit].goodsCategory = {}
+				this.dataList[this.isEdit].parentCategoryId = e.categoryId
+				this.dataList[this.isEdit].parentCategoryName = e.categoryName
+				this.smallList = e.items
+			},
+			changeSmall(e){
+				this.dataList[this.isEdit].goodsCategoryId = e.categoryId
+				this.dataList[this.isEdit].goodsCategoryName = e.categoryName
+				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M',goodsName: e.categoryName}).then(res => {
+					
+				})
+			},
+			add(){
+				this.dataList.push({
+					productCategory: {},
+					parentCategoryId: '',
+					parentCategoryName: '',
+					goodsCategory: {},
+					goodsCategoryName: '',
+					goodsCategoryId: '',
+					goodsSalesUnit: '',
+					salesQty: '',
+					goodsId: '',
+					goodsSpecification: '',
+					saleAmount: ''
+				})
 			}
 		}
 	};
@@ -47,4 +284,37 @@
 		padding: 20px;
 		background-color: #ffffff;
 	}
+	.page-footer {
+		height: 70px;
+	}
+	
+	.footer {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index: 1;
+		width: 100%;
+		background: #fff;
+		padding: 15px 40px;
+		box-sizing: border-box;
+		transition: all 0.28s;
+		text-align: right;
+		box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
+	
+		&.hideSidebar {
+			margin-left: 54px;
+			width: calc(100vw - 54px);
+		}
+	
+		&.openSidebar {
+			margin-left: 210px;
+			width: calc(100vw - 210px);
+		}
+	
+		.tips {
+			font-size: 12px;
+			color: red;
+			margin-top: 10px;
+		}
+	}
 </style>

+ 530 - 0
src/views/auxiliaryFittings/salesManagement/mixins/form_tpl.js

@@ -0,0 +1,530 @@
+import ImageUpload from '@/components/file-upload'
+import { getWebsit } from "@/api/customerManagement.js"
+import { listPageV2 } from "@/api/auxiliaryFittings/supplier";
+export default {
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新建',
+              isRole: true,
+              click: this.addData
+            }
+          ],
+        ],
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+      formDialog: false,
+      formDialogType: 0, // 0:新增, 1:编辑, 2:查看, 3:审核
+      formDialogTitles: ['新增', '编辑', '查看', '审核'],
+      pageType: this?.$route?.name,
+    }
+  },
+  computed: {
+    moreParameters() {
+      return [
+        {
+          name: '状态',
+          key: 'flag',
+          value: '',
+          conditions: [
+            {
+              label: `全部`,
+              value: ''
+            },
+            {
+              label: `已保存`,
+              value: "SAVE"
+            },
+            {
+              label: `已审核`,
+              value: "OK"
+            }, {
+              label: `失败`,
+              value: "FAIL"
+            },
+          ]
+        },
+      ]
+    },
+    columns() {
+      return [
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '大类名称',
+                prop: 'parentCategoryId',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-select value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                      {[].map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                    </el-select> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '小类名称',
+                prop: 'goodsCategoryId',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-select value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                      {[].map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                    </el-select> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '辅材名称',
+                prop: 'goodsName',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-select value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                      {[].map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                    </el-select> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '配件名称',
+                prop: 'goodsName',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-select value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                      {[].map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                    </el-select> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '单位',
+                prop: 'goodsStockUnit',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '数量',
+                prop: 'recQty',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-input type="number" value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                    </el-input> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '退货数量',
+                prop: 'retQty',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-input type="number" value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                    </el-input> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '退款金额',
+                prop: 'retValue',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  row.isEditRow ?
+                    <el-input type="number" value={row[column.prop]} onInput={(val) => { row[column.prop] = val }} placeholder="请选择">
+                    </el-input> :
+                    <div>{row[column.prop]}</div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '商品代码',
+                prop: 'goodsCode',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '规格型号',
+                prop: 'goodsSpecification',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '配件编码',
+                prop: 'goodsId',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '适用品牌',
+                prop: 'brand',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '适用产品大类',
+                prop: 'productCategory',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '采购数量',
+                prop: 'recQty',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '采购价格',
+                prop: 'cost',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsStorage', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '采购金额',
+                prop: 'costValue',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (this.formData.flag === "SAVE" && !!~['auxiliaryMaterialsStorage', 'returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType)) {
+            return [{
+              columnAttributes: {
+                label: '库存数量',
+                prop: 'stockQty',
+              }
+            }]
+          }
+          return []
+        })(),
+        ...(() => {
+          if (!!~[0, 1].indexOf(this.formDialogType)) {
+            return [{
+              columnAttributes: {
+                label: '操作',
+                prop: '',
+              },
+              render: (h, { row, column, index }) => {
+                return (
+                  <div class='operation-btns'>
+                    <el-button type="text" onClick={() => {
+                      this.formData.items.splice(index, 1)
+                    }}>删除</el-button>
+                    {
+                      !row.isEditRow ?
+                      <el-button type="text" onClick={() => {
+                        this.formData.items.map((item, index_) => {
+                          if (index_ == index) {
+                            item.isEditRow = true
+                          } else {
+                            item.isEditRow = false
+                          }
+                        })
+                      }}>编辑</el-button> :
+                      null
+                    }
+                  </div>
+                )
+              }
+            }]
+          }
+          return []
+        })(),
+      ]
+    },
+    formItems1() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }}>
+                  <el-descriptions-item label="单据状态">
+                    {({ SAVE: "保存", OK: "通过", FAIL: "失败" })[this.formData.flag]}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="单据编号">
+                    {(!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType) ? this.formData.purchaseId : this.formData.purchaseRetId) || ''}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="所属商户" contentStyle={{ width: '42%' }}>
+                    {this.formData.companyWechatName}
+                  </el-descriptions-item>
+                </el-descriptions>
+                <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="网点名称">
+                    <el-select style="width:100%" value={this.formData.websitId} onInput={(val) => { this.formData.websitId = val }} placeholder="请选择">
+                      {this.getWebsitList.map(item => <el-option key={item.websitId} label={item.name} value={item.websitId}></el-option>)}
+                    </el-select>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="供应商名称">
+                    <el-select style="width:100%" value={this.formData.venderId} onInput={(val) => { this.formData.venderId = val }} placeholder="请选择">
+                      {this.listPageV2Data.map(item => <el-option key={item.venderId} label={item.venderName} value={item.venderId}></el-option>)}
+                    </el-select>
+                  </el-descriptions-item>
+                </el-descriptions>
+                {
+                  !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType) ?
+                    <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                      <el-descriptions-item label="采购入库单号" contentStyle={{ width: '42%' }}>
+                        {this.formData.purchaseId}
+                      </el-descriptions-item>
+                      <el-descriptions-item label="退货数量">
+                        {this.formData.retTotalQty}
+                      </el-descriptions-item>
+                      <el-descriptions-item label="退款金额">
+                        {this.formData.retTotalAmount}
+                      </el-descriptions-item>
+                    </el-descriptions> : null
+                }
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="制单人">
+                    {this.formData.createBy}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="制单时间">
+                    {this.formData.createTime}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="审核人">
+                    {this.formData.confirmBy}
+                  </el-descriptions-item>
+                  <el-descriptions-item label="审核时间">
+                    {this.formData.confirmTime}
+                  </el-descriptions-item>
+                </el-descriptions>
+                <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
+                  <el-descriptions-item label="附件">
+                    <ImageUpload fileList={this.formData.imageUrl} uid="imgSrc666_materials_drawing_images" limit={1} isEdit={this.formDialogType < 2} />
+                  </el-descriptions-item>
+                  <el-descriptions-item label="备注" contentStyle={{ width: '67%' }}>
+                    <el-input
+                      type="textarea"
+                      placeholder="请输入内容"
+                      value={this.formData.remark}
+                      onInput={(val) => { this.formData.remark = val }}
+                      maxlength="200"
+                      show-word-limit
+                      autosize={{ minRows: 6, maxRows: 8 }}
+                    >
+                    </el-input>
+                  </el-descriptions-item>
+                </el-descriptions>
+              </div>
+            )
+          }
+        },]
+    },
+    formItems2() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                {!!~[0, 1].indexOf(this.formDialogType) ? <div style="margin-bottom:8px">
+                  <el-button onClick={() => {
+                    this.formData.items.map((item) => {item.isEditRow = false})
+                    this.formData.items.push({
+                      "brand": "",
+                      "companyWechatId": "",
+                      "cost": "",
+                      "costValue": "",
+                      "goodsCategoryId": "",
+                      "goodsCategoryName": "",
+                      "goodsCode": "",
+                      "goodsId": "",
+                      "goodsName": "",
+                      "goodsSpecification": "",
+                      "goodsStockUnit": "",
+                      "goodsType": "",
+                      "note": "",
+                      "parentCategoryId": "",
+                      "parentCategoryName": "",
+                      "productCategory": "",
+                      "purchaseId": "",
+                      "recQty": "",
+                      "retQty": "",
+                      "stockQty": "",
+                      "websitId": "",
+                      "websitName": "",
+                      "isEditRow": true
+                    })
+                    // if (this.pageType == "auxiliaryMaterialsStorage") {
+                    // } else if (this.pageType == "returnAuxiliaryMaterials") {
+                    // } else if (this.pageType == "partsStorage") {
+                    // } else if (this.pageType == "partsReturn") {
+                    // }
+                  }}>添加</el-button>
+                </div> : null}
+                <zj-table
+                  columns={this.columns}
+                  tableData={this.formData.items}
+                  tableAttributes={{
+                    size: 'mini',
+                    border: true,
+                  }} />
+              </div>
+            )
+          }
+        },]
+    }
+  },
+  methods: {
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 打开
+    openForm() {
+      Promise.all([
+        getWebsit(),
+        listPageV2({ "pageNum": 1, "pageSize": -1, "params": [] })
+      ]).then(([res1, res2]) => {
+        this.getWebsitList = res1.data.filter(item => item.type == "B")
+        this.listPageV2Data = res2.data.records
+        console.log(res1.data.filter(item => item.type == "B"), res2.data.records)
+        this.formDialog = true
+      })
+    },
+    // 添加
+    addData() {
+      this.formDialogType = 0
+      this.openForm()
+    },
+    // 关闭弹窗
+    formCancel() {
+      this.$refs.formRef.$refs.inlineForm.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+  },
+}

+ 65 - 2
src/views/auxiliaryFittings/salesManagement/transaction/index.vue

@@ -1,8 +1,71 @@
 <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">
+	</template-page>
 </template>
 
 <script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { downloadFiles } from '@/utils/util'
+import { listPageV2,pageExport } from "@/api/auxiliaryFittings/transaction";
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    }
+  },
+  methods: {
+    // 列表请求函数
+	getList: listPageV2,
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+		  <el-button type="text" onClick={() => {
+		    
+		  }}>查看</el-button>
+        </div>
+      )
+    }
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>

+ 97 - 0
src/views/auxiliaryFittings/settleAccountManagement/index.vue

@@ -0,0 +1,97 @@
+<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="status" size="mini" @change="changeType">
+	    	<el-radio-button label="">全部</el-radio-button>
+	    	<el-radio-button label="ING">待结算</el-radio-button>
+	    	<el-radio-button label="OVER">已结算</el-radio-button>
+			<el-radio-button label="EXCEPTION">结算异常</el-radio-button>
+	    </el-radio-group>
+	    <br><br>
+	  </div>
+	</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 } from "@/api/auxiliaryFittings/settleAccountManagement";
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+	  status: ''
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    }
+  },
+  methods: {
+	// 切换状态
+	changeType(val) {
+	  this.$refs.pageRef.refreshList()
+	},
+    // 列表请求函数
+	getList(p) {
+	  try {
+	    var pam = JSON.parse(JSON.stringify(p))
+	    if (this.examineStatus) {
+	      pam.params.push({ "param": "a.status", "compare": "=", "value": this.status })
+	    }
+	    return listPageV2(pam)
+	  } catch (error) {
+	    console.log(error)
+	  }
+	},
+    // 列表导出函数
+    exportList: pageExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+		return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+		  <el-button type="text" onClick={() => {
+		    
+		  }}>查看</el-button>
+        </div>
+      )
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+	.tab{
+		padding: 20px 20px 0 20px;
+	}
+</style>