123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- // headData:描述区显示数据
- // title:主标题内容
- // tabs:tab数据页
- // ownertable:数据表名称
- // delParam:删除数据的请求参数
- // utils.isDisabled(数据状态,[与之匹配的数据],()=>{自定义方法,优先级高于前面的判断})
- <template>
- <div>
- <detail-template :headData="mainAreaData" :title="'订单号:' + orderData.sonum" :tabs="['订单明细']" ownertable="sa_order"
- :delParam="{id:'20221031141202',content:{userids:[router.currentRoute.value.query.id]}}" :disable="utils.isDisabled(userData.status,['ACTIVE'])">
- <template #operation>
- </template>
- <template #tab0>
- </template>
- </detail-template>
- </div>
- </template>
- <script setup>
- import Api from '@/api/api'
- import tool from '@/utils/utils'
- import detailTemplate from '@/components/detailTemplate/index.vue'
- import edit from './modules/edit.vue'
- import { useRouter } from "vue-router";
- import { onMounted,ref } from "vue";
- const router = useRouter()
- const mainAreaData = ref([])
- const param = ref({
- "id": 20221109093902,
- "content": {
- "sa_orderid": 0, //订单ID
- "pageNumber": 1,
- "pageSize": 20,
- "where": {
- "condition": ""
- }
- },
- })
- const orderData = ref({})
- const mianData = async ()=>{
- const res = await Api.requested({
- "id":'20221108151302',
- "content": {
- "nocache":true,
- "sa_orderid": router.currentRoute.value.query.id
- }
- })
- orderData.value = res.data
- changeDataStructure(res.data)
- }
- const changeDataStructure = (data) => {
- mainAreaData.value = [
- {
- label:'订单状态',
- value:data.status,
- style:function() {
- let style = {}
- switch (data.status) {
- case '新建':
- style = {color:"#000000"}
- break;
- case '提交':
- style = {color:"#d90a0a"}
- break;
- case '交期待确认':
- style = {color:"#e09a1a"}
- break;
- case '交期确认':
- style = {color:"#3874f6"}
- break;
- case '审核':
- style = {color:"#52C41A"}
- break;
- case '关闭':
- style = {color:"#b2c0ea"}
- break;
- default:
- break;
- }
- return style
- }
- },
- {
- label:'订单类型',
- value:data.type
- },
- {
- label:'明细分类',
- value:data.typemx
- },
- {
- label:'单据日期',
- value:data.billdate
- },
- {
- label:'企业名称',
- value:data.enterprisename
- },
- {
- label:'订单总金额',
- value:data.defaultamount,
- style:function () {
- let style = {color:"#ff0000"}
- return style
- }
- },
- {
- label:'合计数量',
- value:data.qty,
- style:function () {
- let style = {color:"#ff0000"}
- return style
- }
- },
- {
- label:'品牌',
- value:data.brandname
- },
- {
- label:'领域',
- value:data.tradefield
- },
- {
- label:'领域明细',
- value:data.tradefieldmx
- },
- {
- label:'业务员',
- value:data.saler_name
- },
- {
- label:'销售分类',
- value:`${data.saletype}`
- },
- {
- label:'退回原因',
- value:data.backreason
- },
- {
- label:'备注',
- value:data.remarks
- },
- ]
- }
- const onSelectChange = (val) =>{
- console.log(val,'orderManage')
- }
- const columns = [
- {
- title:'行号',
- dataIndex:'rowno',
- width:90,
- ellipsis:true,
- },
- {
- title:'产品名称',
- dataIndex:'itemname',
- width:180,
- ellipsis:true,
- },
- {
- title:'产品编号',
- dataIndex:'itemno',
- width:180,
- ellipsis:true,
- },
- {
- title:'erp编号',
- dataIndex:'erpitemno',
- width:180,
- ellipsis:true,
- },
- {
- title:'型号',
- dataIndex:'model',
- width:180,
- ellipsis:true,
- },
- {
- title:'规格',
- dataIndex:'spec',
- width:180,
- ellipsis:true,
- },
- {
- title:'数量',
- dataIndex:'qty',
- width:180,
- ellipsis:true,
- },
- {
- title:'标准价格',
- dataIndex:'marketprice',
- width:180,
- ellipsis:true,
- },
- {
- title:'单价',
- dataIndex:'price',
- width:180,
- ellipsis:true,
- },
- {
- title:'金额',
- dataIndex:'amount',
- width:180,
- ellipsis:true,
- },
- {
- title:'库存数量',
- dataIndex:'cansaleqty',
- width:180,
- ellipsis:true,
- },
- {
- title:'库存状态',
- dataIndex:'stockstatus',
- width:180,
- ellipsis:true,
- },
- {
- title:'包装数量',
- dataIndex:'packageqty',
- width:180,
- ellipsis:true,
- },
- {
- title:'未发货数量',
- dataIndex:'undeliqty',
- width:180,
- ellipsis:true,
- },
- {
- title:'备注',
- dataIndex:'remarks',
- width:360,
- ellipsis:true,
- }
- ]
- onMounted (()=>{
- mianData()
- })
- </script>
- <style>
- </style>
|